| 1 |
name: Actions |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
push: |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
permissions: {} |
| 12 |
concurrency: |
| 13 |
group: '${{ github.workflow }}-${{ github.ref }}' |
| 14 |
cancel-in-progress: true |
| 15 |
|
| 16 |
jobs: |
| 17 |
lint: |
| 18 |
name: Lint |
| 19 |
runs-on: ubuntu-latest |
| 20 |
steps: |
| 21 |
- name: π₯ Checkout the repository |
| 22 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 23 |
|
| 24 |
- name: π Set up Python 3 |
| 25 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 26 |
id: python |
| 27 |
with: |
| 28 |
python-version-file: .python-version |
| 29 |
|
| 30 |
- name: Install uv |
| 31 |
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 |
| 32 |
with: |
| 33 |
version: "0.10.6" |
| 34 |
|
| 35 |
- name: Install dependencies |
| 36 |
run: scripts/bootstrap |
| 37 |
|
| 38 |
- name: Check lint |
| 39 |
run: scripts/lint-check |
| 40 |
|
| 41 |
|
| 42 |
test: |
| 43 |
name: Test with Python ${{ matrix.python.version }} |
| 44 |
needs: lint |
| 45 |
runs-on: ubuntu-latest |
| 46 |
strategy: |
| 47 |
matrix: |
| 48 |
python: |
| 49 |
- version: "3.13" |
| 50 |
- version: "3.14" |
| 51 |
steps: |
| 52 |
- name: π₯ Checkout the repository |
| 53 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 54 |
|
| 55 |
- name: π οΈ Set up Python ${{ matrix.python.version }} |
| 56 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 57 |
with: |
| 58 |
python-version: ${{ matrix.python.version }} |
| 59 |
allow-prereleases: ${{ matrix.python.prereleases || false }} |
| 60 |
|
| 61 |
- name: Install uv |
| 62 |
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 |
| 63 |
with: |
| 64 |
version: "0.10.6" |
| 65 |
|
| 66 |
- name: π¦ Install dependencies |
| 67 |
run: scripts/bootstrap |
| 68 |
|
| 69 |
- name: π Run tests |
| 70 |
run: scripts/test |
| 71 |
|
| 72 |
- name: π Build |
| 73 |
run: scripts/build |
| 74 |
|
| 75 |
coverage: |
| 76 |
name: Coverage |
| 77 |
needs: test |
| 78 |
runs-on: ubuntu-latest |
| 79 |
steps: |
| 80 |
- name: π₯ Checkout the repository |
| 81 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 82 |
|
| 83 |
- name: π Set up Python |
| 84 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 85 |
id: python |
| 86 |
with: |
| 87 |
python-version-file: .python-version |
| 88 |
|
| 89 |
- name: Install uv |
| 90 |
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 |
| 91 |
with: |
| 92 |
version: "0.10.6" |
| 93 |
|
| 94 |
- name: π¦ Install dependencies |
| 95 |
run: scripts/bootstrap |
| 96 |
|
| 97 |
- name: π€ Upload coverage to Codecov |
| 98 |
run: | |
| 99 |
scripts/coverage |
| 100 |
curl -sfSL https://codecov.io/bash | bash - |