-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (46 loc) · 1.35 KB
/
run_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
52
name: Run Tests
on: [push, pull_request]
jobs:
tests:
name: Run Tests
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9, "3.10", "3.11", "3.12"]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/test_environment.yml
activate-environment: hera_opm_tests
- name: Conda Info
run: |
conda info -a
conda list
PYVER=`python -c "import sys; print('{:d}.{:d}'.format(sys.version_info.major, sys.version_info.minor))"`
if [[ $PYVER != $PYTHON ]]; then
exit 1;
fi
- name: Run Tests
run: |
python -m pytest --cov=hera_opm --cov-report xml:coverage.xml
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
env_vars: PYTHON
verbose: true