Repository navigation
143 lines (135 loc) · 4.78 KB
/
Copy pathtest.yml
File metadata and controls
143 lines (135 loc) · 4.78 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# allow manual runs on branches without a PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
pre-commit:
name: Pre-commit checks (Black, Flake8, MyPy, ...)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
test-dist:
name: Test SDist & wheel
needs: pre-commit
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install CPython 3.10
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
architecture: x64
- name: Run tests
run: pipx run nox -s test-sdist-3.10 test-wheel-3.10
test:
name: CPython ${{ matrix.python }} ${{ matrix.platform[0] }} on ${{ matrix.platform[1] }}
needs: test-dist
runs-on: ${{ matrix.platform[1] }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
platform:
- [ 'x86_64', 'ubuntu-24.04' ]
python: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
include:
- platform: [ 'aarch64', 'ubuntu-24.04-arm' ]
python: '3.12'
- platform: [ 'i686', 'ubuntu-24.04' ]
python: '3.12'
- platform: [ 'armv7l', 'ubuntu-24.04-arm' ]
python: '3.12'
- platform: [ 'ppc64le', 'ubuntu-24.04' ]
python: '3.12'
qemu: true
- platform: [ 's390x', 'ubuntu-24.04' ]
python: '3.12'
qemu: true
- platform: [ 'riscv64', 'ubuntu-24.04' ]
python: '3.12'
qemu: true
- platform: [ 'aarch64', 'macos-26' ]
python: '3.12'
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/auditwheel_tests
key: python${{ matrix.python }}-${{ matrix.platform[0] }}-${{ hashFiles('**/test_manylinux.py') }}
restore-keys: python${{ matrix.python }}-${{ matrix.platform[0] }}-
- name: Install CPython ${{ matrix.python }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "${{ matrix.python }}"
allow-prereleases: true
- name: Set up QEMU
if: matrix.qemu
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- name: Run tests
run: pipx run nox -s tests-${{ matrix.python }}
env:
AUDITWHEEL_ARCH: ${{ matrix.platform[0] }}
AUDITWHEEL_QEMU: ${{ matrix.qemu }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-${{ matrix.python }}-${{ matrix.platform[0] }}-${{ matrix.platform[1] }}
path: coverage-*.xml
retention-days: 1
coverage_report:
name: Coverage Report
needs: [test]
runs-on: ubuntu-slim
if: github.repository == 'pypa/auditwheel'
permissions:
contents: read
id-token: write # upload to codecov with OIDC
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: coverage-*
merge-multiple: true
- name: Upload coverage to codecov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
use_oidc: true
check_all_green:
if: always()
name: Check all tests green
needs: [pre-commit, test-dist, test, coverage_report]
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: ${{ (github.repository != 'pypa/auditwheel') && 'coverage_report' || '' }}