Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Nov 17, 2023
1 parent 0651eb2 commit d502103
Showing 1 changed file with 55 additions and 19 deletions.
74 changes: 55 additions & 19 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- master

jobs:
ubuntu-cpp-tests:
name: C++ tests Ubuntu
ubuntu-cpp-python-tests:
name: C++/Python tests Ubuntu
runs-on: ubuntu-22.04

strategy:
Expand All @@ -33,11 +33,59 @@ jobs:
- name: C++ tests
run: scripts/run-cpp-tests.sh


- name: Install python package
run: scripts/installAmiciSource.sh

- name: Python tests (part 1)
run: |
source build/venv/bin/activate \
&& pytest \
--ignore-glob=*petab* \
--ignore-glob=*test_splines.py \
--ignore-glob=*test_splines_short.py \
--ignore-glob=*test_pysb.py \
--cov=amici \
--cov-report=xml:"${AMICI_DIR}/build/coverage_py.xml" \
--cov-append \
--durations=10 \
${AMICI_DIR}/python/tests
- name: Python tests splines
if: ${{ github.base_ref == 'master' || github.event.merge_group.base_ref == 'master'}}
run: |
source build/venv/bin/activate \
&& pytest \
--cov=amici \
--cov-report=xml:"${AMICI_DIR}/build/coverage_py.xml" \
--cov-append \
--durations=10 \
${AMICI_DIR}/python/tests/test_splines.py
- name: Codecov Python
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: build/coverage_py.xml
flags: python
fail_ci_if_error: true
verbose: true

- name: Capture coverage info (lcov)
run: |
lcov --compat-libtool --no-external \
-d ${AMICI_DIR}/build/CMakeFiles/amici.dir/src \
-b ${AMICI_DIR} -c -o coverage_cpp.info \
&& lcov --compat-libtool --no-external \
-d ${AMICI_DIR}/python/sdist/build/temp_amici/CMakeFiles/amici.dir/src \
-b ${AMICI_DIR}/python/sdist -c -o coverage_py.info \
&& lcov -a coverage_cpp.info -a coverage_py.info -o coverage.info
- name: Codecov CPP
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.info
file: coverage_cpp.info
flags: cpp
fail_ci_if_error: true

Expand Down Expand Up @@ -76,27 +124,15 @@ jobs:
run: scripts/installAmiciSource.sh

- name: Python tests
run: |
source build/venv/bin/activate \
&& pytest \
--ignore-glob=*petab* \
--ignore-glob=*test_splines.py \
--cov=amici \
--cov-report=xml:"${AMICI_DIR}/build/coverage_py.xml" \
--cov-append \
--durations=10 \
${AMICI_DIR}/python/tests
- name: Python tests splines
if: ${{ github.base_ref == 'master' || github.event.merge_group.base_ref == 'master'}}
run: |
source build/venv/bin/activate \
&& pytest \
--cov=amici \
--cov-report=xml:"${AMICI_DIR}/build/coverage_py.xml" \
--cov-append \
--durations=10 \
${AMICI_DIR}/python/tests/test_splines.py
${AMICI_DIR}/python/tests/test_pysb.py \
${AMICI_DIR}/python/tests/test_splines_short.py
- name: Codecov Python
uses: codecov/[email protected]
Expand All @@ -107,7 +143,7 @@ jobs:
fail_ci_if_error: true
verbose: true

- name: lcov
- name: Capture coverage info (lcov)
run: |
lcov --compat-libtool --no-external \
-d ${AMICI_DIR}/build/CMakeFiles/amici.dir/src \
Expand Down Expand Up @@ -180,7 +216,7 @@ jobs:
fail_ci_if_error: true
verbose: true

- name: lcov
- name: Capture coverage info (lcov)
run: |
lcov --compat-libtool --no-external \
-d ${AMICI_DIR}/build/CMakeFiles/amici.dir/src \
Expand Down

0 comments on commit d502103

Please sign in to comment.