| 1 |
name: CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
concurrency: |
| 12 |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 13 |
cancel-in-progress: true |
| 14 |
|
| 15 |
jobs: |
| 16 |
lint: |
| 17 |
runs-on: ubuntu-latest |
| 18 |
name: Lint |
| 19 |
steps: |
| 20 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 21 |
|
| 22 |
- name: Set up Python 3.14 |
| 23 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 24 |
with: |
| 25 |
python-version: "3.14" |
| 26 |
cache: "pip" |
| 27 |
cache-dependency-path: pyproject.toml |
| 28 |
|
| 29 |
- name: Install dependencies |
| 30 |
run: | |
| 31 |
python3 -m pip install --upgrade pip |
| 32 |
python3 -m pip install -e .[test] |
| 33 |
|
| 34 |
- name: Lint/test with pre-commit |
| 35 |
run: SKIP=no-commit-to-branch pre-commit run --all-files |
| 36 |
|
| 37 |
test: |
| 38 |
runs-on: ubuntu-latest |
| 39 |
name: Run tests with Python ${{ matrix.python-version }} |
| 40 |
needs: lint |
| 41 |
strategy: |
| 42 |
matrix: |
| 43 |
python-version: |
| 44 |
- "3.14" |
| 45 |
|
| 46 |
steps: |
| 47 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 48 |
|
| 49 |
- name: Set up Python ${{ matrix.python-version }} |
| 50 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 51 |
with: |
| 52 |
python-version: ${{ matrix.python-version }} |
| 53 |
cache: "pip" |
| 54 |
cache-dependency-path: pyproject.toml |
| 55 |
|
| 56 |
- name: Install dependencies |
| 57 |
run: | |
| 58 |
python3 -m pip install --upgrade pip |
| 59 |
python3 -m pip install -e .[test] |
| 60 |
|
| 61 |
- name: Run Tests |
| 62 |
run: scripts/test |