Fix links to classes #3872
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: Ubuntu | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
| required: false | |
| default: false | |
| # This job runs the test suite in two environments: | |
| # - py_pinned: uses Python 3.11 with the existing poetry.lock file (our stable, pinned dev environment) | |
| # - py_latest: latest Python version we want to support, without the lock file to furthermore install the newest dependency versions | |
| # | |
| # This ensures compatibility with both our controlled dev setup and the latest upstream packages, | |
| # helping catch issues introduced by dependency updates or newer Python versions. | |
| jobs: | |
| cpu: | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, 'ci skip')" | |
| strategy: | |
| matrix: | |
| include: | |
| - env_name: py_pinned | |
| python-version: "3.11" | |
| use_lock: true | |
| - env_name: py_latest | |
| python-version: "3.13" | |
| use_lock: false | |
| steps: | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3 | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| - name: Cancel previous run | |
| uses: styfle/cancel-workflow-action@0.11.0 | |
| with: | |
| access_token: ${{ github.token }} | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install poetry | |
| uses: abatilo/actions-poetry@v2 | |
| - name: Setup a local virtual environment (if no poetry.toml file) | |
| run: | | |
| poetry config virtualenvs.create true --local | |
| poetry config virtualenvs.in-project true --local | |
| - name: Remove poetry.lock for latest dependency test | |
| if: ${{ !matrix.use_lock }} | |
| run: rm -f poetry.lock | |
| - name: Define a cache for the virtual environment based on the dependencies lock file | |
| if: matrix.use_lock | |
| uses: actions/cache@v3 | |
| with: | |
| path: ./.venv | |
| key: venv-${{ matrix.env_name }}-${{ hashFiles('poetry.lock') }} | |
| restore-keys: | | |
| venv-${{ matrix.env_name }}- | |
| - name: Install the project dependencies | |
| run: | | |
| if [ "${{ matrix.env_name }}" = "py_latest" ]; then | |
| poetry install --with dev --extras "eval" | |
| else | |
| poetry install --with dev --extras "envpool eval" | |
| fi | |
| - name: List installed packages | |
| run: | | |
| poetry run pip list | |
| - name: wandb login | |
| run: | | |
| poetry run wandb login e2366d661b89f2bee877c40bee15502d67b7abef | |
| - name: Test with pytest | |
| run: | | |
| if [ "${{ matrix.env_name }}" = "py_pinned" ]; then | |
| poetry run poe test | |
| else | |
| poetry run poe test-nocov | |
| fi | |
| - name: Upload coverage to Codecov | |
| if: matrix.env_name == 'py_pinned' | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV }} | |
| file: ./coverage.xml | |
| flags: ${{ matrix.env_name }} | |
| name: codecov-${{ matrix.env_name }} | |
| fail_ci_if_error: false |