Merge pull request #93 from master-csmi/convergence_analysis #48
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
name: Python package | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.10"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }}- | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
libmpich-dev \ | |
python3-dev | |
mpichversion | |
which mpiexec | |
mpiexec --version | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Install parareal package | |
run: | | |
pip install -e . | |
- name: Run MPI tests | |
run: | | |
echo "Running MPI tests with Python ${{ matrix.python-version }}" | |
timeout 5m mpiexec -n 2 python -m pytest tests/test_mpi_parareal.py | |
env: | |
MPIEXEC_TIMEOUT: 300 | |
- name: Run standard tests | |
run: | | |
pytest | |
- name: Generate coverage report | |
run: | | |
pytest --cov=your_package --cov-report=xml | |
continue-on-error: true | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
continue-on-error: true |