-
Notifications
You must be signed in to change notification settings - Fork 145
73 lines (68 loc) · 1.89 KB
/
test.yml
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
name: Test
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
pre-commit:
name: Pre-commit checks (Black, Flake8, MyPy, ...)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- uses: pre-commit/action@v3.0.1
test-dist:
name: Test SDist & wheel
needs: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install CPython 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Run tests
run: pipx run nox -s test-dist -- 3.9
test:
name: CPython ${{ matrix.python }}
needs: test-dist
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python: "3.8"
- python: "3.9"
- python: "3.10"
- python: "3.11"
- python: "3.12"
- python: "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v4
with:
path: ~/.cache/auditwheel_tests
key: python${{ matrix.python }}-${{ hashFiles('**/test_manylinux.py') }}
restore-keys: python${{ matrix.python }}-
- name: Install CPython ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python }}"
architecture: x64
allow-prereleases: true
- name: Run tests
run: pipx run nox -s tests-${{ matrix.python }}
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}