77 pull_request :
88 branches : [ main ]
99
10+ permissions :
11+ contents : read
12+
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
16+
1017jobs :
11- tests :
18+ lint :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23+ with :
24+ persist-credentials : false
25+
26+ - name : Set up Python
27+ uses : actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
28+ with :
29+ python-version : " 3.15"
1230
31+ - name : Install dependencies
32+ run : |
33+ python3 -m pip install --upgrade pip
34+ python3 -m pip install . --group lint
35+
36+ - name : Ruff lint
37+ run : python3 -m ruff check --output-format=github .
38+
39+ - name : Ruff format
40+ run : python3 -m ruff format --check --diff .
41+
42+ - name : Mypy
43+ run : python3 -m mypy
44+
45+ tests :
1346 runs-on : ubuntu-latest
1447 strategy :
48+ fail-fast : false
1549 matrix :
16- python-version : ["3.11", "3.12", "3.13"]
50+ python-version : ["3.11", "3.12", "3.13", "3.14", "3.15" ]
1751
1852 steps :
1953 - name : Checkout
20- uses : actions/checkout@v4
54+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
55+ with :
56+ persist-credentials : false
2157
2258 - name : Set up Python ${{ matrix.python-version }}
23- uses : actions/setup-python@v5
59+ uses : actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2460 with :
2561 python-version : ${{ matrix.python-version }}
2662
27- - uses : actions/cache@v4
28- with :
29- path : ~/.cache/pip
30- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
31-
3263 - name : Install dependencies
3364 run : |
3465 python3 -m pip install --upgrade pip
35- python3 -m pip install "." pytest
66+ python3 -m pip install . --group test
3667
3768 - name : Test with pytest
3869 run : |
@@ -41,16 +72,18 @@ jobs:
4172 publish :
4273 runs-on : ubuntu-latest
4374 if : ${{ startsWith(github.ref, 'refs/tags/') }}
44- needs : tests
75+ needs : [lint, tests]
4576 permissions :
4677 id-token : write # OIDC for uploading to PyPI
4778
4879 steps :
4980 - name : Checkout
50- uses : actions/checkout@v4
81+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
82+ with :
83+ persist-credentials : false
5184
5285 - name : Set up Python
53- uses : actions/setup-python@v5
86+ uses : actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
5487 with :
5588 python-version : " 3.11"
5689
6093 python3 -m build
6194
6295 - name : Publish package distributions to PyPI
63- uses : pypa/gh-action-pypi-publish@release/v1
96+ uses : pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
0 commit comments