-
Notifications
You must be signed in to change notification settings - Fork 46
95 lines (80 loc) · 2.66 KB
/
snakedeploy_tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Snakedeploy
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
snakedeploy_tests:
env:
THREADS: 5
strategy:
max-parallel: 5
fail-fast: false
matrix:
virus: ["hiv", "sars-cov-2"]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout test data
uses: actions/checkout@v4
with:
sparse-checkout: |
tests
resources/*/gffs
sparse-checkout-cone-mode: false
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: "3.11" # temporary fix for snakemake issue #2480
mamba-version: "*"
use-mamba: true
no-implicit-channels: true
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: snakemake
auto-update-conda: true
environment-file: tests/conda_snakedeploy_env.yaml
- name: Snakedeploy
# snakedeploy will issue error message if workflow/ or config/ exist, i.e. if tests/ was not sparsely checked out
run: |
snakedeploy deploy-workflow "$(git remote get-url origin)" . --branch "$(git rev-parse HEAD)"
- name: Configure
run: |
tests/configure_for_virus.sh "${{ matrix.virus }}"
# HACK: currently remote URL aren't supported as directories
cp -vrf "resources/${{ matrix.virus }}/gffs" ./
- name: Run test
run: |
PYTHONUNBUFFERED=1 snakemake \
--config "input={gff_directory: 'gffs'}" \
--use-conda \
--cores "${THREADS}" \
--dry-run
echo
cat config/samples.tsv
echo
PYTHONUNBUFFERED=1 snakemake \
--config "input={gff_directory: 'gffs'}" \
--use-conda \
--cores "${THREADS}" \
-p \
--keep-going
- name: Archive test results
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test_output_${{ matrix.virus }}
path: |
./*
!./.git
!./.snakemake/conda/*/
include-hidden-files: true
if-no-files-found: ignore