Skip to content

Moved some more functionality to the backends #1899

Moved some more functionality to the backends

Moved some more functionality to the backends #1899

name: "Generate coverage report"
on: [push]
jobs:
coverage_report:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup FFmpeg
uses: AnimMouse/setup-ffmpeg@v1
- name: Install dependencies
# install all requirements. Note that the full requirements are installed separately
# so the job does not fail if one of the packages cannot be installed. This allows
# testing the package for newer python version even when some of the optional
# packages are not yet available.
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 -I % sh -c "pip install % || true"
pip install -r tests/requirements.txt
- name: Generate serial coverage report
env:
NUMBA_DISABLE_JIT: 1
MPLBACKEND: agg
PYPDE_TESTRUN: 1
run: |
export PYTHONPATH="${PYTHONPATH}:`pwd`"
pytest --cov-config=pyproject.toml --cov=pde -n auto tests
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: "openmpi"
- name: Generate parallel coverage report
env:
NUMBA_DISABLE_JIT: 1
MPLBACKEND: agg
PYPDE_TESTRUN: 1
run: |
export PYTHONPATH="${PYTHONPATH}:`pwd`"
pip install -r tests/requirements_mpi.txt
mpiexec -n 2 pytest --cov-config=pyproject.toml --cov-append --cov=pde --use_mpi tests
- name: Create coverage report
run: |
coverage xml -o coverage_report.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage_report.xml
flags: unittests
name: codecov-pydev
fail_ci_if_error: true