Skip to content

Enable Parallel Deconvolution in Lollipop #1104

Enable Parallel Deconvolution in Lollipop

Enable Parallel Deconvolution in Lollipop #1104

name: Tests
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
static_tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Install conda environment dependencies
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
miniforge-variant: Miniforge3
python-version: "3.11"
mamba-version: "*"
use-mamba: true
no-implicit-channels: true
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: V-pipe
auto-update-conda: true
environment-file: tests/conda_lint_env.yaml
- name: Code formatting
run: snakefmt --check .
- name: Setup project
run: |
mkdir -p lintest/config # virus does not matter
cd lintest/
$GITHUB_WORKSPACE/init_project.sh -n
# dummy content so pipeline is configured properly
cp -vr $GITHUB_WORKSPACE/tests/data/hiv/ ./samples
sed -E 's/(#*virus_base_config:) .*$/\1 hiv/;s/false$/true/g;s/(trim_primers:) .*$/\1 false/' $GITHUB_WORKSPACE/config/config.yaml | tee ./config.yaml
- name: Snakemake linting
env:
PYTHONUNBUFFERED: 1
uses: snakemake/snakemake-github-action@v1
with:
directory: lintest/
snakefile: 'workflow/Snakefile'
args: '--lint'
continue-on-error: true # HACK for now snakemake linting is considered non-critical
runtime_tests:
needs: static_tests
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13] # , macos-latest] # disable until V-pipe's support for aarch64 is checked
python-version: ["3.10", "3.11"]
virus: ["hiv", "sars-cov-2"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
lfs: false
# NOTE to save on bandwidth costs, GitHub Action will not use GitHub's own LFS
- name: Install conda environment dependencies
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
miniforge-variant: Miniforge3
python-version: ${{ matrix.python-version }}
mamba-version: "*"
use-mamba: true
no-implicit-channels: true
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: V-pipe
auto-update-conda: true
environment-file: tests/conda_test_env.yaml
- name: Setup project
run: |
mkdir -p /tmp/project/${{ matrix.virus }}/
cd /tmp/project/${{ matrix.virus }}/
$GITHUB_WORKSPACE/init_project.sh -n
- name: Run tests
working-directory: ./tests
run: ./regression_tests.sh ${{ matrix.virus }}
- name: Archive code coverage results
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: regression_test_${{ matrix.os }}_${{ matrix.python-version }}_${{ matrix.virus }}
path: |
/tmp/v-pipe_tests/*
!/tmp/v-pipe_tests/.snakemake/conda/*/
include-hidden-files: true
if-no-files-found: ignore