|
a |
|
b/.github/workflows/test.yml |
|
|
1 |
name: Test |
|
|
2 |
|
|
|
3 |
on: |
|
|
4 |
schedule: |
|
|
5 |
- cron: 00 00 * * 1 |
|
|
6 |
push: |
|
|
7 |
branches: [main] |
|
|
8 |
pull_request: |
|
|
9 |
branches: [main] |
|
|
10 |
|
|
|
11 |
concurrency: |
|
|
12 |
group: ${{ github.workflow }}-${{ github.ref }} |
|
|
13 |
cancel-in-progress: true |
|
|
14 |
|
|
|
15 |
jobs: |
|
|
16 |
test: |
|
|
17 |
runs-on: ${{ matrix.os }} |
|
|
18 |
strategy: |
|
|
19 |
fail-fast: false |
|
|
20 |
matrix: |
|
|
21 |
os: [ubuntu-latest] |
|
|
22 |
python: ["3.10", "3.11"] |
|
|
23 |
include: |
|
|
24 |
- os: macos-latest |
|
|
25 |
python: "3.10" |
|
|
26 |
|
|
|
27 |
steps: |
|
|
28 |
- uses: actions/checkout@v3 |
|
|
29 |
- name: Set up Python ${{ matrix.python }} |
|
|
30 |
uses: actions/setup-python@v4 |
|
|
31 |
with: |
|
|
32 |
python-version: ${{ matrix.python }} |
|
|
33 |
|
|
|
34 |
- name: Install pip dependencies |
|
|
35 |
run: | |
|
|
36 |
python -m pip install --upgrade pip |
|
|
37 |
pip install tox |
|
|
38 |
|
|
|
39 |
- name: Test |
|
|
40 |
run: | |
|
|
41 |
tox -e py-${{ matrix.python }} |
|
|
42 |
env: |
|
|
43 |
PYTEST_ADDOPTS: -vv -n 2 |
|
|
44 |
|
|
|
45 |
- name: Upload coverage |
|
|
46 |
uses: codecov/codecov-action@v3 |
|
|
47 |
with: |
|
|
48 |
files: ./coverage.xml |
|
|
49 |
flags: tests-${{ matrix.os }}-${{ matrix.python }} |
|
|
50 |
name: unittests |
|
|
51 |
env_vars: OS,PYTHON |
|
|
52 |
fail_ci_if_error: false |
|
|
53 |
verbose: true |