Feature/sq lite database #44
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
# For the slurm action to work, you have to supply a mysql service as defined below. | |
services: | |
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: | |
- name: Set up SLURM | |
uses: koesterlab/setup-slurm-action@v1 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
use-mamba: true | |
activate-environment: slurm_sweeps | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Get Date for Conda cache | |
id: get-date | |
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache Conda env | |
uses: actions/cache@v3 | |
env: | |
CACHE_NUMBER: 0 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: | |
conda-${{ | |
runner.os }}-${{ | |
steps.get-date.outputs.today }}-${{ | |
hashFiles('environment.yml') }}-${{ | |
env.CACHE_NUMBER }} | |
id: cache | |
- name: Update environment | |
run: mamba env update -n slurm_sweeps -f environment.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Running tests | |
run: pytest --cov=slurm_sweeps | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |