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 " , "py313t ",
24+ " py314 " , "py314t ",
25+ " pypy310 " ,
26+ " pypy311 " ,
2827 ]
2928 fail-fast : false
3029 steps :
3130 - 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
31+ - name : Install uv
32+ uses : astral-sh/setup-uv@v6
33+ - name : Install tox
34+ run : uv tool install tox --with tox-uv
4135 - name : Setup SocketCAN
4236 if : ${{ matrix.os == 'ubuntu-latest' }}
4337 run : |
@@ -46,11 +40,11 @@ jobs:
4640 sudo ./test/open_vcan.sh
4741 - name : Test with pytest via tox
4842 run : |
49- tox -e gh
43+ tox -e ${{ matrix.env }}
5044 env :
5145 # SocketCAN tests currently fail with PyPy because it does not support raw CAN sockets
5246 # See: https://foss.heptapod.net/pypy/pypy/-/issues/3809
53- TEST_SOCKETCAN : " ${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.python-version , 'pypy' ) }}"
47+ TEST_SOCKETCAN : " ${{ matrix.os == 'ubuntu-latest' && ! startsWith(matrix.env , 'pypy' ) }}"
5448 - name : Coveralls Parallel
5549 uses : coverallsapp/github-action@v2
5650 with :
@@ -73,69 +67,25 @@ jobs:
7367 runs-on : ubuntu-latest
7468 steps :
7569 - 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
70+ - name : Install uv
71+ uses : astral-sh/setup-uv@v6
72+ - name : Install tox
73+ run : uv tool install tox --with tox-uv
74+ - name : Run linters
8875 run : |
89- mypy --python-version 3.10 .
90- - name : mypy 3.11
76+ tox -e lint
77+ - name : Run type checker
9178 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 .
79+ tox -e type
12680
12781 docs :
12882 runs-on : ubuntu-latest
12983 steps :
13084 - uses : actions/checkout@v4
131- - name : Set up Python
132- uses : actions/setup-python@v5
133- with :
134- python-version : " 3.13"
135- - name : Install dependencies
136- run : |
137- python -m pip install --upgrade pip
138- pip install tox
85+ - name : Install uv
86+ uses : astral-sh/setup-uv@v6
87+ - name : Install tox
88+ run : uv tool install tox --with tox-uv
13989 - name : Build documentation
14090 run : |
14191 tox -e docs
@@ -147,14 +97,12 @@ jobs:
14797 - uses : actions/checkout@v4
14898 with :
14999 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"
100+ - name : Install uv
101+ uses : astral-sh/setup-uv@v6
154102 - name : Build wheel and sdist
155- run : pipx run build
103+ run : uvx --from build pyproject-build --installer uv
156104 - name : Check build artifacts
157- run : pipx run twine check --strict dist/*
105+ run : uvx twine check --strict dist/*
158106 - name : Save artifacts
159107 uses : actions/upload-artifact@v4
160108 with :
0 commit comments