Skip to content

Tests (ubuntu, parallel) #1522

Tests (ubuntu, parallel)

Tests (ubuntu, parallel) #1522

name: Tests (ubuntu, parallel)
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '03 22 * * *'
jobs:
parallel_tests:
name: Test (py=${{ matrix.python-version}}, ${{ matrix.mpi }})
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
mpi: [mpich, openmpi]
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/${{ matrix.mpi }}.yml
miniforge-version: latest
python-version: ${{ matrix.python-version }}
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 tests in parallel
env:
OMP_NUM_THREADS: 1
run: |
mpirun -n 2 python3 -m pytest -vv --timeout=1800 -p no:cacheprovider --randomly-seed=${{ github.run_id }} tests/