Skip to content

Test matrix

Test matrix #176

Workflow file for this run

name: Unittest
on: [pull_request]
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.10", "3.11", "3.12"]
services: # Required for Slurm cluster
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
ports:
- "8888:3306"
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/setup_slurm_action # Set up medium slurm cluster
- uses: r-lib/actions/setup-r@v2
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -y python=${{ matrix.python-version }} # https://github.com/conda/conda/issues/13560#issuecomment-1992720842
conda env update --file dev-env.yml --name base
- name: Install RunSolver dependencies
run: |
sudo apt-get install libnuma-dev
sudo apt-get install numactl
- name: Install pdflatex for report generation dependency
run: sudo apt-get install texlive-latex-base
- name: Run Unittest
run: |
pytest --all
- name: Archive outputs
uses: actions/upload-artifact@v4
if: failure()
with:
name: output
path: Output/
retention-days: 5