-
-
Notifications
You must be signed in to change notification settings - Fork 108
74 lines (69 loc) · 2.04 KB
/
test.yml
File metadata and controls
74 lines (69 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI
on:
push:
pull_request:
env:
PYTHON_OLDEST: "3.11"
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Configure vcan0
if: matrix.os == 'ubuntu-latest'
run: |
set -euxo pipefail
if ! ip link show vcan0 >/dev/null 2>&1; then
sudo ip link add dev vcan0 type vcan || {
if ! modinfo vcan >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y "linux-modules-extra-$(uname -r)" || sudo apt-get install -y linux-modules-extra-azure
fi
sudo modprobe can
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
}
fi
sudo ip link set up vcan0
ip -details link show vcan0
- run: pip install nox
- run: nox -s test --python ${{ matrix.python }}
- run: nox -s examples --python ${{ matrix.python }}
if: matrix.python == env.PYTHON_OLDEST && matrix.os != 'macos-latest'
- uses: actions/upload-artifact@v7
if: always()
with:
name: htmlcov-${{ matrix.os }}-py${{ matrix.python }}
path: htmlcov/
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_OLDEST }}
- run: pip install nox
- run: nox -s mypy
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_OLDEST }}
- run: pip install nox
- run: nox -s format