-
Notifications
You must be signed in to change notification settings - Fork 46
90 lines (75 loc) · 2.42 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
name: Snakedeploy
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
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@v3
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@v2
with:
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
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
uses: actions/upload-artifact@v3
with:
name: test_output
path: |
./*
!./.git
!./.snakemake/conda/*/
if-no-files-found: ignore