[pre-commit.ci] pre-commit autoupdate #146
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - stable | |
| - v*.*.* | |
| tags: | |
| - v* | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Tests, Python 3.9, Ubuntu | |
| os: ubuntu-latest | |
| python: '3.9' | |
| nox_session: tests-3.9 | |
| - name: Tests, Python 3.11, with code coverage, macOS | |
| os: macos-latest | |
| python: '3.11' | |
| nox_session: tests-3.11(cov) | |
| - name: Tests, Python 3.10, macOS | |
| os: macos-latest | |
| python: '3.9' | |
| nox_session: tests-3.9 | |
| - name: Documentation, Python 3.11, Ubuntu | |
| os: ubuntu-latest | |
| python: '3.11' | |
| nox_session: docs | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: pip | |
| - name: Install mamba | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| auto-update-conda: false | |
| python-version: ${{ matrix.python }} | |
| miniforge-version: 'latest' | |
| - name: Install Python dependencies | |
| run: python -m pip install --progress-bar off --upgrade nox | |
| - name: Run tests | |
| run: nox -s '${{ matrix.nox_session }}' | |
| - name: Upload coverage to codecov | |
| if: ${{ contains(matrix.nox_session,'cov') }} | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |