Update gh-actions workflows for uv #105
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, develop] | |
| paths: ["src/**", "tests/**", ".github/workflows/ci.yml"] | |
| pull_request: | |
| branches: [main, develop] | |
| paths: ["src/**", "tests/**", ".github/workflows/ci.yml"] | |
| workflow_dispatch: | |
| jobs: | |
| CI: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install Python ${{ matrix.python-version }} & dependencies | |
| run: uv sync --all-extras --all-groups --upgrade --python ${{ matrix.python-version }} | |
| - name: Run ruff lint check | |
| run: uv run ruff check --diff | |
| - name: Run ruff format check | |
| run: uv run ruff format --check --diff | |
| - name: Run pytest | |
| run: uv run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=src | tee pytest-coverage.txt | |
| - name: Pytest Coverage Comment | |
| uses: MishaKav/pytest-coverage-comment@main | |
| with: | |
| pytest-coverage-path: pytest-coverage.txt | |
| junitxml-path: pytest.xml | |
| if: ${{ matrix.os=='ubuntu-latest' && matrix.python-version=='3.12' && !env.ACT }} |