-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (32 loc) · 927 Bytes
/
pytest.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
name: 'python tests'
on:
- 'push'
- 'pull_request'
jobs:
build:
runs-on: 'ubuntu-latest'
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
compiler:
- cc: 'clang'
ldshared: 'clang -shared'
- cc: 'gcc'
steps:
- uses: 'actions/checkout@v3'
- name: 'install compiler'
run: |
sudo apt-get install -y ${{ matrix.compiler.cc }}
echo >> "$GITHUB_ENV" 'CC=${{ matrix.compiler.cc }}'
echo >> "$GITHUB_ENV" 'LDSHARED=${{ matrix.compiler.ldshared }}'
- name: 'set up python ${{ matrix.python-version }}'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: 'install tox'
run: |
python -mpip install -U pip setuptools
python -mpip install -U tox tox-gh-actions
- name: 'run tests'
run: |
tox