|
1 | | -name: "Python CI" |
| 1 | +name: Python CI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
7 | 7 | pull_request: |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - pre-commit: |
11 | | - uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1 |
| 10 | + lint-test: |
| 11 | + runs-on: ubuntu-latest |
12 | 12 |
|
13 | | - lint: |
14 | | - needs: pre-commit |
15 | | - uses: darbiadev/.github/.github/workflows/python-lint.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1 |
| 13 | + steps: |
| 14 | + - name: Checkout repository |
| 15 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
16 | 16 |
|
17 | | - test: |
18 | | - needs: lint |
19 | | - strategy: |
20 | | - matrix: |
21 | | - os: [ ubuntu-latest ] |
22 | | - python-version: [ "3.11" ] |
| 17 | + - name: Setup Python |
| 18 | + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 |
| 19 | + with: |
| 20 | + python-version: 3.12 |
| 21 | + allow-prereleases: true |
| 22 | + cache: pip |
| 23 | + cache-dependency-path: uv.lock |
23 | 24 |
|
24 | | - uses: darbiadev/.github/.github/workflows/python-test.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1 |
25 | | - with: |
26 | | - os: ${{ matrix.os }} |
27 | | - python-version: ${{ matrix.python-version }} |
| 25 | + - name: Set up uv |
| 26 | + run: curl -LsSf https://astral.sh/uv/install.sh | sh |
| 27 | + |
| 28 | + - name: Sync dependencies |
| 29 | + run: uv sync --group dev --group tests |
| 30 | + |
| 31 | + - name: Run pre-commit |
| 32 | + run: uv run pre-commit run --all-files |
| 33 | + |
| 34 | + - name: Check formatting |
| 35 | + run: uv run ruff format --check . |
| 36 | + |
| 37 | + - name: Run Ruff checks |
| 38 | + run: uv run ruff check --output-format=github . |
| 39 | + |
| 40 | + - name: Run mypy |
| 41 | + run: uv run mypy --strict src/ |
| 42 | + |
| 43 | + - name: Run tests |
| 44 | + run: uv run python -m coverage run -m pytest -v |
| 45 | + |
| 46 | + - name: Upload coverage reports to Codecov |
| 47 | + uses: codecov/codecov-action@d168679d447a7d9f9917d4b26caf2cfbf080cfb4 # v5.0.6 |
| 48 | + env: |
| 49 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
28 | 50 |
|
29 | 51 | docs: |
30 | 52 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
|
33 | 55 | pages: write |
34 | 56 | id-token: write |
35 | 57 |
|
36 | | - uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1 |
| 58 | + uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0 |
0 commit comments