Update README.md #100
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 SnakemakeProfiles/slurm | |
env: | |
SNAKEMAKE_IMAGE: quay.io/biocontainers/snakemake:7.30.1--hdfd78af_0 | |
SLURM_IMAGE: giovtorres/docker-centos7-slurm:20.11.8 | |
DOCKER_COMPOSE: tests/docker-compose.yaml | |
on: [push, pull_request] | |
jobs: | |
slurmtest: | |
name: Test slurm profile in docker containers | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- run: mkdir -p ~/image-cache | |
- name: cache conda environment | |
uses: actions/cache@v3 | |
env: | |
CACHE_NUMBER: 0 | |
with: | |
path: ~/conda_pkgs_dir | |
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda-linux-64.lock') }} | |
- name: cache images | |
uses: actions/cache@v3 | |
id: cache-images | |
env: | |
CACHE_NUMBER: 0 | |
with: | |
path: ~/image-cache | |
key: image-cache-${{ runner.os }}-${{ env.CACHE_NUMBER }}-${{ env.SNAKEMAKE_IMAGE }}-${{ env.SLURM_IMAGE }} | |
- name: install miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
environment-file: conda-linux-64.lock | |
use-only-tar-bz2: true | |
- name: docker swarm init | |
run: docker swarm init | |
- if: steps.cache-images.outputs.cache-hit == 'true' | |
run: docker load -i ~/image-cache/snakemake.tar | |
- if: steps.cache-images.outputs.cache-hit == 'true' | |
run: docker load -i ~/image-cache/slurm.tar | |
- name: docker deploy | |
shell: bash -l {0} | |
env: | |
DOCKER_COMPOSE: ${{ env.DOCKER_COMPOSE }} | |
SNAKEMAKE_IMAGE: ${{ env.SNAKEMAKE_IMAGE }} | |
SLURM_IMAGE: ${{ env.SLURM_IMAGE }} | |
run: ./tests/deploystack.sh | |
- if: steps.cache-images.outputs.cache-hit != 'true' | |
run: docker save -o ~/image-cache/snakemake.tar ${{ env.SNAKEMAKE_IMAGE }} | |
- if: steps.cache-images.outputs.cache-hit != 'true' | |
run: docker save -o ~/image-cache/slurm.tar ${{ env.SLURM_IMAGE }} | |
- name: run tests | |
shell: bash -l {0} | |
run: | | |
pytest -v -s tests/test_cookie.py | |
pytest -v -s tests/test_utils.py | |
pytest -v -s tests/test_slurm.py --slow | |
pytest -v -s tests/test_sidecar.py |