Update GitHub workflows #545
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
| # This workflow will install uv, run tests and lint the code on various Python versions. | |
| name: CI Build | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ${{ fromJson(vars.PYTHON_VERSIONS) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| activate-environment: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Check line length violations with ruff | |
| run: uv run ruff check --select=E501 --exit-zero | |
| - name: Lint with ruff | |
| run: uv run ruff check --ignore=E501 | |
| - name: Run tests | |
| run: uv run pytest --cov | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.python-version == vars.PYTHON_LATEST_VERSION | |
| with: | |
| token: "${{ secrets.CODECOV_TOKEN }}" | |
| disable_telem: true |