-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Daetools add regression test with sourceforce daetools (#127)
Adds an extra workflow which tests mpet with a newer daetools pulled from sourceforge
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
.github/workflows/mpet-regression-test-sourceforge-daetools.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: MPET regression test with daetools 2.2.0 from sourceforge on python 3.10 | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10"] | ||
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 dependencies for daetools | ||
run: | | ||
mamba install numpy scipy matplotlib pyqt lxml pandas h5py openpyxl | ||
- name: Install daetools from sourceforge | ||
run: | | ||
curl -L 'https://master.dl.sourceforge.net/project/daetools/daetools/2.2.0/daetools-2.2.0-gnu_linux-x86_64.zip' -o dae.zip | ||
unzip dae.zip | ||
cd daetools* | ||
python setup.py install | ||
- 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 |