-
-
Notifications
You must be signed in to change notification settings - Fork 70
73 lines (69 loc) · 2.01 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
py_ver: ["3.8", "3.9", "3.10", "3.11"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.py_ver }}
steps:
- uses: actions/checkout@master
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge,defaults
channel-priority: true
python-version: ${{ matrix.py_ver }}
environment-file: environment.yaml
activate-environment: gs
- name: Conda info
shell: bash -l {0}
run: |
conda info --all
conda list
- name: Running serial tests
shell: bash -l {0}
run: |
pytest tests \
-vv \
-n 0 \
-m "serial" \
--color=yes \
--cov=./ \
--cov-append \
--cov-report html:coverage-serial-html \
--cov-report xml:coverage-serial.xml \
--cov-config=.coveragerc \
--junit-xml=Linux-py${{ matrix.py_ver }}-serial.xml \
--junit-prefix=Linux-py${{ matrix.py_ver }}-serial
- name: Running parallel tests
shell: bash -l {0}
run: |
pytest tests \
-vv \
-n 0 \
-m "not serial" \
--color=yes \
--cov=./ \
--cov-append \
--cov-report html:coverage-parallel-html \
--cov-report xml:coverage-parallel.xml \
--cov-config=.coveragerc \
--junit-xml=Linux-py${{ matrix.py_ver }}-parallel.xml \
--junit-prefix=Linux-py${{ matrix.py_ver }}-parallel
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
files: ./coverage-serial.xml,./coverage-parallel.xml
directory: .
flags: unittests