Test Demos #874
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: Test Demos | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '02 23 * * *' | |
jobs: | |
serial_demos: | |
name: Serial demos | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Create conda environment | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: .github/conda/mpich.yml | |
miniforge-version: latest | |
python-version: 3.12 | |
activate-environment: test | |
auto-activate-base: false | |
conda-remove-defaults: true | |
- name: Show conda info | |
run: conda info | |
- name: Show list of all installed packages | |
run: conda list | |
- name: Install package | |
run: | | |
pip install .[all] | |
- name: Run demos | |
env: | |
OMP_NUM_THREADS: 2 | |
run: | | |
python3 -m pytest -vv demos/test.py | |
parallel_demos: | |
name: Parallel demos | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Create conda environment | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: .github/conda/mpich.yml | |
miniforge-version: latest | |
python-version: 3.12 | |
activate-environment: test | |
auto-activate-base: false | |
conda-remove-defaults: true | |
- name: Show conda info | |
run: conda info | |
- name: Show list of all installed packages | |
run: conda list | |
- name: Install package | |
run: | | |
pip install .[all] | |
- name: Run demos in parallel | |
env: | |
OMP_NUM_THREADS: 1 | |
run: | | |
python3 -m pytest -vv demos/test_mpi.py |