-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (44 loc) · 1.28 KB
/
test-wheels.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
# Run the unit tests against several pythons and platforms
# using a pre-built wheel artifact to install the package.
name: Test wheel
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
build-wheel:
uses: ./.github/workflows/build-wheel.yml
test-wheels:
needs: [build-wheel]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout unit tests
uses: actions/checkout@v3
with:
sparse-checkout: |
tests
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: File listing
run: ls -R
- name: Fetch built wheel
uses: actions/download-artifact@v3
with:
name: wheel-artifact
path: dist
- name: File listing
run: ls -R
- name: Install wheel
run: |
# Workaround for globbing the wheel on windows
python -c "import glob, subprocess, sys; subprocess.check_call((sys.executable, '-m', 'pip', 'install', glob.glob('dist/*.whl')[0]))"
- name: Run unittests
run: |
python -m unittest discover -v