-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.48 KB
/
tests.yaml
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
name: Tests
on: [push]
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: checkout
uses: actions/checkout@v4
- name: lint
run: |
pip install isort black[jupyter] flake8-docstrings
isort --check . -v
black --check */ -v
flake8 . -v
testing:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.13"]
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: run tests
run: |
git lfs fetch
git lfs checkout
pip install .[TEST]
pytest --cov=. --cov-config=pyproject.toml --cov-report term \
--cov-report xml:./tests/coverage.xml
- name: upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage_report_${{ matrix.os }}_${{ matrix.python-version }}
path: ./tests/coverage.xml