Skip to content

Merge pull request #132 from TRI-AMDD/development #26

Merge pull request #132 from TRI-AMDD/development

Merge pull request #132 from TRI-AMDD/development #26

name: MPET regression test with daetools from sourceforge
on: [push, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: mpet
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- 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