Skip to content

Commit 175684b

Browse files
committed
Unpin dependencies in pipeline to catch breakages early, and add pre-commit run -a
If all goes well, this will cause the pipeline to complete successfully but fail with a pre-commit error, which the next commit will solve.
1 parent 85ae8b6 commit 175684b

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- main
75
pull_request:
86

97
jobs:
10-
tests:
11-
name: Python ${{ matrix.python-version }}
12-
runs-on: ubuntu-24.04
8+
pre-commit:
9+
name: Run pre-commit hooks
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout
13+
- uses: actions/setup-python
14+
- run: python -m pip install --upgrade pre-commit
15+
- run: pre-commit run -a
1316

17+
tests:
18+
name: Run tests using Python ${{ matrix.python-version }}
19+
runs-on: ubuntu-latest
1420
strategy:
1521
matrix:
1622
python-version:
@@ -19,18 +25,10 @@ jobs:
1925
- '3.11'
2026
- '3.12'
2127
- '3.13'
22-
2328
steps:
24-
- uses: actions/checkout@v2
25-
26-
- uses: actions/setup-python@v2
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
30-
- name: Install dependencies
31-
run: |
32-
python -m pip install --upgrade pip setuptools wheel
33-
python -m pip install --upgrade nox
34-
35-
- name: Run tox targets for ${{ matrix.python-version }}
36-
run: nox --session tests-${{ matrix.python-version }}
29+
- uses: actions/checkout
30+
- uses: actions/setup-python
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- run: python -m pip install --upgrade nox
34+
- run: nox --session tests-${{ matrix.python-version }}

0 commit comments

Comments
 (0)