Skip to content

Update to snakemake8 #44

Update to snakemake8

Update to snakemake8 #44

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:
jobs:
Unit_testing:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f .tests/unit/requirements.txt ]; then pip install -r .tests/unit/requirements.txt; fi
- name: Unit testing
run: |
pytest .tests/unit
- name: Cancelling parallel jobs
if: ${{ failure() }}
uses: andymckay/[email protected]
Integration_testing:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Unpack test data
run: |
mkdir -p .tests/integration/data/Listeria_cgmlst_Ruppitsch_chewbbaca
tar -xzf .tests/integration/data/Ruppitsch_chewbbacca.tar.gz -C .tests/integration/data/Listeria_cgmlst_Ruppitsch_chewbbaca --strip-components 1
- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge,bioconda
activate-environment: snkmk
- name: Integration testing
run: |
mamba install 'snakemake>=6.3.0' -n snkmk
mamba env export
/usr/share/miniconda3/envs/snkmk/bin/snakemake -s workflow/Snakefile --cores 1 --software-deployment-method conda --conda-prefix envs --show-failed-logs --configfile .tests/integration/config/config.yaml --keep-incomplete
- name: Archive logs on fail
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: fail-logs
path: |
.tests/integration/logs/
.tests/integration/allele_calling/logs
.tests/integration/join_clusters_main/logs
.tests/integration/join_clusters_sub/logs
if-no-files-found: warn
retention-days: 3