-
Notifications
You must be signed in to change notification settings - Fork 19
111 lines (98 loc) · 3 KB
/
tests.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
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
name: tests
on:
push:
paths:
- src/**
- test/**
- setup.py
- requirements.txt
- Makefile
pull_request:
workflow_dispatch:
jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python: [ '3.8', '3.9', 'pypy-3.9', '3.10', '3.11', '3.12', '3.13' ]
include:
- os: macos-13
python: 3.8
- os: macos-13
python: 3.9
exclude:
- os: macos-latest
python: 3.8
- os: macos-latest
python: 3.9
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: install dependencies
run: |
python3 -m pip install pytest
python3 -m pip -vvv --no-use-pep517 install .
- name: install Unix dependencies
if: matrix.os != 'windows-latest'
run: python3 -m pip install pytest-forked
- name: run tests
run: python3 -m pytest
# Test building from source distribution
test-build-from-source:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
python_tag: ['cp311', 'pp39']
include:
- os: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64 # https://github.com/pypa/manylinux
steps:
- uses: actions/checkout@v3
- name: set up python
run: |
PYT=`echo "${{ matrix.python_tag }}" | tr -d "."`; ls -d -1 /opt/python/$PYT-*/bin | head -n 1 >> $GITHUB_PATH
cat $GITHUB_PATH
- name: install dependencies
run: |
python3 -m pip install wheel
- name: build sdist
run: |
python3 setup.py sdist
- name: try to use it
run: |
tar xzf dist/slipcover*.tar.gz
cd slipcover*
python3 setup.py build
# Run a manylinux wheel build to verify build configuration
test-build-wheel-manylinux:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
python_version: ['3.8', '3.9', '3.10', '3.11']
include:
- os: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64 # https://github.com/pypa/manylinux
steps:
- uses: actions/checkout@v3
- name: set up python
run: |
PYV=`echo "${{ matrix.python_version }}" | tr -d "."`; ls -d -1 /opt/python/cp$PYV*/bin | head -n 1 >> $GITHUB_PATH
cat $GITHUB_PATH
- name: install dependencies
run: |
python3 -m pip install --upgrade pip # otherwise building 'cryptography' may fail
python3 -m pip install setuptools wheel twine
- name: build wheel
run: |
python3 setup.py bdist_wheel
- name: run auditwheel for manylinux
run: |
auditwheel repair dist/*.whl
rm -f dist/*.whl
mv wheelhouse/*.whl dist/