-
Notifications
You must be signed in to change notification settings - Fork 59
45 lines (43 loc) · 1.4 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
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 5 * * 2'
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
include:
- {name: Python 3.8, python: 3.8, os: ubuntu}
- {name: Python 3.9, python: '3.9', os: ubuntu}
- {name: Python 3.10, python: '3.10', os: ubuntu}
- {name: Python 3.11, python: '3.11', os: ubuntu}
- {name: Python 3.12, python: '3.12', os: ubuntu}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install libxml2
if: startsWith(matrix.python, 'pypy') || startsWith(matrix.python, '3.10')
run: |
sudo apt-get install libxml2-dev libxslt-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools pytest pytest-xdist xmlschema pytest-cov
python -m pip install .[test]
- name: Test
run: |
pytest --cov=./nfelib --cov-report=xml --cov-branch --doctest-glob="docs/*.md"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true