[pre-commit.ci] pre-commit autoupdate #682
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: Unix | |
on: | |
push: | |
pull_request: | |
# Run daily at midnight (UTC). | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, '3.10', 3.11] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache conda | |
uses: actions/cache@v2 | |
# Increase this value to reset cache | |
env: {CACHE_NUMBER: 0} | |
with: | |
path: ~/conda_pkgs_dir | |
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ matrix.python-version }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
name: Setup conda | |
with: | |
auto-update-conda: true | |
activate-environment: testing | |
auto-activate-base: false | |
channels: defaults | |
channel-priority: true | |
- shell: bash -l {0} | |
name: Install dependencies | |
run: | | |
conda install numpy pandas pytorch cpuonly -c pytorch | |
conda install -c conda-forge mpi4py mpich | |
pip install .[test] | |
- shell: bash -l {0} | |
name: Run unit tests with MPICH | |
run: | | |
python -m pytest tests/ | |
- shell: bash -l {0} | |
name: Replace MPICH with openMPI | |
run: | | |
conda uninstall mpi4py mpich | |
conda install -c conda-forge mpi4py openmpi | |
- shell: bash -l {0} | |
name: Run unit tests with openMPI | |
run: | | |
rm -r tests_output | |
python -m pytest tests/ |