-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (53 loc) · 1.55 KB
/
mpet-regression-test.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
name: MPET regression test
on: [push, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.10","3.11"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
path: mpet
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
activate-environment: mpet-env
- name: Install daetools via mamba
run: |
mamba install daetools
- name: Install additional dependencies using mpet's setup.py
run: |
cd mpet
pip install .[test]
- name: Set up test for modified branch
run: |
cd mpet/bin
rm -rf workdir
mkdir workdir
cd workdir
cp ../run_tests.py .
ln -s ../../mpet .
ln -s ../../tests .
- name: run tests for modified branch and get coverage
run: |
cd mpet/bin/workdir
coverage run --source=../../mpet/ run_tests.py --test_dir ./tests --output_dir ../../bin/workdir/modified > /dev/null
- name: upload Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mpet/bin/workdir
coveralls --service=github || : #Dont fret if if fails
- name: Checks test results
run: |
cd mpet/tests
pytest --baseDir=ref_outputs --modDir=../bin/workdir/modified compare_tests.py