Bump actions/checkout from 6 to 7 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: cpu-validation | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: evalforge-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
| PIP_NO_INPUT: "1" | |
| PYTHONUTF8: "1" | |
| jobs: | |
| quality-and-smoke: | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: '3.11' | |
| - os: ubuntu-latest | |
| python-version: '3.12' | |
| - os: ubuntu-latest | |
| python-version: '3.13' | |
| - os: windows-latest | |
| python-version: '3.11' | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install package and CI tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev]" | |
| python -m pip check | |
| - name: Validate CI workflow contract | |
| run: python scripts/validate_ci_contract.py | |
| - name: Parse checked-in PowerShell scripts | |
| shell: pwsh | |
| run: pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/verify_powershell_syntax.ps1 | |
| - name: Verify Python file invocation contract | |
| shell: pwsh | |
| run: pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/verify_python_file_invocation.ps1 | |
| - name: Runtime origin diagnostics | |
| run: python -m evalforge doctor --json | |
| - name: Lint | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| run: ruff check . | |
| - name: Check formatting | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| run: ruff format --check . | |
| - name: Run test suite | |
| run: python -m pytest --junitxml=junit.xml | |
| - name: Run CPU smoke pipeline | |
| run: python -m evalforge run --config configs/smoke.yaml | |
| - name: Verify installed CLI entry point | |
| run: evalforge --help | |
| - name: Upload validation evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cpu-validation-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: | | |
| junit.xml | |
| outputs/runs/ | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| package-build: | |
| name: build-and-check-distributions | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Build wheel and source distribution | |
| run: | | |
| python -m pip install --upgrade pip build twine | |
| python -m build --sdist --wheel --outdir dist | |
| python -m twine check dist/* | |
| - name: Upload distributions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-distributions | |
| path: dist/ | |
| if-no-files-found: error | |
| retention-days: 7 | |
| package-install: | |
| name: ${{ matrix.os }} / clean-${{ matrix.distribution }}-install | |
| needs: package-build | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| distribution: wheel | |
| - os: windows-latest | |
| distribution: wheel | |
| - os: ubuntu-latest | |
| distribution: sdist | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Download built distribution | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-distributions | |
| path: dist | |
| - name: Verify clean distribution install outside source tree | |
| run: >- | |
| python scripts/verify_distribution_install.py | |
| --dist-dir dist | |
| --distribution ${{ matrix.distribution }} | |
| --packaged-smoke-config | |
| --work-dir distribution-validation-${{ matrix.os }}-${{ matrix.distribution }} | |
| - name: Upload distribution-install evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: distribution-install-${{ matrix.os }}-${{ matrix.distribution }} | |
| path: | | |
| dist/ | |
| distribution-validation-${{ matrix.os }}-${{ matrix.distribution }}/distribution_validation.json | |
| distribution-validation-${{ matrix.os }}-${{ matrix.distribution }}/outside_source_tree/outputs/ | |
| if-no-files-found: warn | |
| retention-days: 7 |