forked from pstelzig/MoPyRegtest
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.98 KB
/
job-examples.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
name : Run job for examples folder
on: [workflow_dispatch]
jobs:
examples-test:
runs-on: ubuntu-latest
container: openmodelica/openmodelica:v1.23.0-minimal
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
apt-get -qq update
apt-get -qq --no-install-recommends install python3 python3-pip
pip install numpy pandas
- name: Install Modelica STL 4.0.0
run: |
echo "installPackage(Modelica, \"4.0.0+maint.om\", exactMatch=true);" > installModelicaStl.mos && omc installModelicaStl.mos
- name: Install MoPyRegtest with current code
run: |
pip3 install --user .
- name: Run regression test examples
run: |
cd examples
python3 -m unittest
- name: Run test generation examples with mopyregtest command line tool
run: |
cd examples/generate_tests
/github/home/.local/bin/mopyregtest generate \
--metric=Lp_dist --tol=1.25e-5 \
./gen_tests BlocksLpDist_from_cli \
~/".openmodelica/libraries/Modelica 4.0.0+maint.om/" \
Modelica.Blocks.Sources.Sine,Modelica.Blocks.Sources.ExpSine,Modelica.Blocks.Sources.Step
cd gen_tests
python3 test_blockslpdist_from_cli.py
- name: Run test generation examples with script
run: |
cd examples/generate_tests
python3 gentests_modelica_blocks_sources.py
cd gen_tests
python3 test_blocksabsdistptwise_from_script.py
python3 test_blocksuserdef_from_script.py
- name: Run CSV file comparison with mopyregtest command line tool
run: |
/github/home/.local/bin/mopyregtest compare \
--metric=Lp_dist \
--tol=0.015 \
--validated-cols=y \
--fill-in-method=interpolate \
./examples/test_user_defined_metrics/references/SineNoisy_res.csv \
./examples/test_user_defined_metrics/references/Sine_res.csv