-
Notifications
You must be signed in to change notification settings - Fork 33
90 lines (73 loc) · 2.44 KB
/
test_petab_sciml.yml
File metadata and controls
90 lines (73 loc) · 2.44 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: PEtab
on:
push:
branches:
- main
- 'release*'
pull_request:
branches:
- main
merge_group:
workflow_dispatch:
jobs:
build:
name: PEtab SciML Testsuite
runs-on: ubuntu-latest
env:
ENABLE_GCOV_COVERAGE: TRUE
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v5
with:
fetch-depth: 20
# todo, update after https://github.com/sebapersson/petab_sciml_testsuite/issues/14 is merged
- name: Download PEtab SciML test suite
run: |
git clone --depth 1 --branch main \
https://github.com/FFroehlich/petab_sciml_testsuite \
tests/sciml/testsuite
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies
# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y python3-venv
- run: |
echo "${HOME}/.local/bin/" >> $GITHUB_PATH
# install AMICI
- name: Install python package
run: scripts/installAmiciSource.sh
- name: Install petab
run: |
source ./venv/bin/activate \
&& pip3 install wheel pytest shyaml pytest-cov
# retrieve test models
- name: Download and install PEtab SciML
run: |
source ./venv/bin/activate \
&& python -m pip install git+https://github.com/petab-dev/petab_sciml.git@main#subdirectory=src/python \
- name: Install petab
run: |
source ./venv/bin/activate \
&& python3 -m pip uninstall -y petab \
&& python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@sciml \
- name: Run PEtab SciML testsuite
run: |
source ./venv/bin/activate \
&& pytest --cov-report=xml:coverage_petab_sciml.xml \
--cov=amici tests/sciml/test_sciml.py
- name: Codecov
if: (github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev') && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage_petab_sciml.xml
flags: petab_sciml
fail_ci_if_error: true