-
Notifications
You must be signed in to change notification settings - Fork 3
executable file
·77 lines (71 loc) · 2.55 KB
/
test_pipelines.yml
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
name: Python package
on: [push]
jobs:
Test:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
matrix:
test: ["config", "design", "pipeline"]
assay: ["atac", "chip-rx", "chip", "rna-rx", "rna", "snp"]
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
id: cache-env
uses: actions/cache@v3
with:
path: |
~/.conda
~/.cache/pip
key: ${{ runner.os }}-env-${{ hashFiles('**/testing.yml') }}
restore-keys: |
${{ runner.os }}-env-
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: testing.yml
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
- name: Install package
shell: pwsh
run: |
pip install .
- name: Cache singularity
if: matrix.test == 'pipeline'
id: cache-singularity
uses: actions/cache@v3
with:
path: ~/.apptainer
key: ${{ runner.os }}-singularity-${{ hashFiles('tmp/*') }}
restore-keys: |
${{ runner.os }}-singularity-
- uses: eWaterCycle/setup-apptainer@v2
if: matrix.test == 'pipeline'
with:
apptainer-version: 1.1.2
- name: Add singularity hub remote
if: matrix.test == 'pipeline'
shell: pwsh
run: |
apptainer remote add --no-login SylabsCloud cloud.sylabs.io
apptainer remote use SylabsCloud
- name: Pull singularity images
if: matrix.test == 'pipeline' && steps.cache-singularity.outputs.cache-hit != 'true'
shell: bash
run: |
echo "Pulling singularity images from the remote repository..."
mkdir -p tmp
if [[ "${{ matrix.test }}" == "pipeline" ]]; then
apptainer pull --force library://asmith151/seqnado/seqnado_pipeline:latest
elif [[ "${{ matrix.assay }}" == "atac" || "${{ matrix.assay }}" == "chip" ]]; then
apptainer pull --force library://asmith151/seqnado/seqnado_extra:latest
elif [[ "${{ matrix.assay }}" == "rna-rx" ]]; then
apptainer pull --force library://asmith151/seqnado/seqnado_report:latest
fi
- name: Test ${{ matrix.test }} ${{ matrix.assay }}
shell: pwsh
env:
TMPDIR: /tmp
run: |
pytest tests/test_pipelines.py::test_${{ matrix.test }}[${{ matrix.assay }}] -vv -s --cores 4