-
Notifications
You must be signed in to change notification settings - Fork 30
43 lines (34 loc) · 1.04 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
name: Test
on: push
env:
COVERAGE: 1
jobs:
run_tests:
name: Run tests on ${{ matrix.os }} with python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-13 ]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools pytest pytest-cov
- name: Install project
run: |
pip install .
python setup.py clean --all build_ext --force --inplace
- name: Run tests
run: |
pytest --junitxml=results.xml --cov
- name: Run Coverage Generation
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo chmod +x cppci.sh
./cppci.sh
bash <(curl -s https://codecov.io/bash) -cF python