1212jobs :
1313 test :
1414 runs-on : ${{ matrix.os }}
15- continue-on-error : ${{ matrix.experimental }} # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
1615 strategy :
1716 matrix :
1817 os : [ubuntu-latest, macos-latest, windows-latest]
19- experimental : [false]
20- python-version : [
21- " 3.9" ,
22- " 3.10" ,
23- " 3.11" ,
24- " 3.12" ,
25- " 3.13" ,
26- " pypy-3.9" ,
27- " pypy-3.10" ,
18+ env : [
19+ " py39" ,
20+ " py310" ,
21+ " py311" ,
22+ " py312" ,
23+ " py313" ,
24+ " py314" ,
25+ # "py313t",
26+ # "py314t",
27+ " pypy310" ,
28+ " pypy311" ,
2829 ]
2930 fail-fast : false
3031 steps :
3132 - uses : actions/checkout@v4
32- - name : Set up Python ${{ matrix.python-version }}
33- uses : actions/setup-python@v5
34- with :
35- python-version : ${{ matrix.python-version }}
36- allow-prereleases : true
37- - name : Install dependencies
38- run : |
39- python -m pip install --upgrade pip
40- pip install tox
33+ - name : Install uv
34+ uses : astral-sh/setup-uv@v6
35+ - name : Install tox
36+ run : uv tool install tox --with tox-uv
4137 - name : Setup SocketCAN
4238 if : ${{ matrix.os == 'ubuntu-latest' }}
4339 run : |
@@ -46,11 +42,11 @@ jobs:
4642 sudo ./test/open_vcan.sh
4743 - name : Test with pytest via tox
4844 run : |
49- tox -e gh
45+ tox -e ${{ matrix.env }}
5046 env :
5147 # SocketCAN tests currently fail with PyPy because it does not support raw CAN sockets
5248 # See: https://foss.heptapod.net/pypy/pypy/-/issues/3809
53- TEST_SOCKETCAN : " ${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.python-version , 'pypy' ) }}"
49+ TEST_SOCKETCAN : " ${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.env , 'pypy' ) }}"
5450 - name : Coveralls Parallel
5551 uses : coverallsapp/github-action@v2
5652 with :
@@ -73,69 +69,25 @@ jobs:
7369 runs-on : ubuntu-latest
7470 steps :
7571 - uses : actions/checkout@v4
76- - name : Set up Python
77- uses : actions/setup-python@v5
78- with :
79- python-version : " 3.13"
80- - name : Install dependencies
81- run : |
82- python -m pip install --upgrade pip
83- pip install --group lint -e .
84- - name : mypy 3.9
85- run : |
86- mypy --python-version 3.9 .
87- - name : mypy 3.10
72+ - name : Install uv
73+ uses : astral-sh/setup-uv@v6
74+ - name : Install tox
75+ run : uv tool install tox --with tox-uv
76+ - name : Run linters
8877 run : |
89- mypy --python-version 3.10 .
90- - name : mypy 3.11
78+ tox -e lint
79+ - name : Run type checker
9180 run : |
92- mypy --python-version 3.11 .
93- - name : mypy 3.12
94- run : |
95- mypy --python-version 3.12 .
96- - name : mypy 3.13
97- run : |
98- mypy --python-version 3.13 .
99- - name : ruff
100- run : |
101- ruff check can
102- - name : pylint
103- run : |
104- pylint \
105- can/**.py \
106- can/io \
107- doc/conf.py \
108- examples/**.py \
109- can/interfaces/socketcan
110-
111- format :
112- runs-on : ubuntu-latest
113- steps :
114- - uses : actions/checkout@v4
115- - name : Set up Python
116- uses : actions/setup-python@v5
117- with :
118- python-version : " 3.10"
119- - name : Install dependencies
120- run : |
121- python -m pip install --upgrade pip
122- pip install --group lint
123- - name : Code Format Check with Black
124- run : |
125- black --check --verbose .
81+ tox -e type
12682
12783 docs :
12884 runs-on : ubuntu-latest
12985 steps :
13086 - uses : actions/checkout@v4
131- - name : Set up Python
132- uses : actions/setup-python@v5
133- with :
134- python-version : " 3.12"
135- - name : Install dependencies
136- run : |
137- python -m pip install --upgrade pip
138- pip install tox
87+ - name : Install uv
88+ uses : astral-sh/setup-uv@v6
89+ - name : Install tox
90+ run : uv tool install tox --with tox-uv
13991 - name : Build documentation
14092 run : |
14193 tox -e docs
@@ -147,14 +99,12 @@ jobs:
14799 - uses : actions/checkout@v4
148100 with :
149101 fetch-depth : 0 # fetch tags for setuptools-scm
150- - name : Set up Python
151- uses : actions/setup-python@v5
152- with :
153- python-version : " 3.10"
102+ - name : Install uv
103+ uses : astral-sh/setup-uv@v6
154104 - name : Build wheel and sdist
155- run : pipx run build
105+ run : uvx --from build pyproject-build --installer uv
156106 - name : Check build artifacts
157- run : pipx run twine check --strict dist/*
107+ run : uvx twine check --strict dist/*
158108 - name : Save artifacts
159109 uses : actions/upload-artifact@v4
160110 with :
0 commit comments