-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (118 loc) · 3.86 KB
/
test.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
###############################################################################
#
# AUTHOR: Maciej_Bak
# CONTACT: wsciekly.maciek@gmail.com
# CREATED: 15-02-2022
# LICENSE: Apache_2.0
#
###############################################################################
---
name: ci-pipeline
on: push
jobs:
pipeline-testruns:
runs-on: ubuntu-20.04
name: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: "true"
- name: Setup miniconda & conda env
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
auto-update-conda: true
environment-file: environment.yml
activate-environment: warlock
auto-activate-base: false
- name: Display all miniconda & env info
shell: bash -l {0}
run: |
conda info -a
conda list
conda clean --all --yes
- name: Print compiler path (Ubuntu)
shell: bash -l {0}
run: which g++
- name: Compile demon (Ubuntu)
shell: bash -l {0}
run: >
g++ resources/demon_model/src/demon.cpp
-o resources/demon_model/bin/demon
-I/usr/share/miniconda3/envs/warlock/include
-lm
- name: Prepare internal conda envs (Ubuntu)
shell: bash -l {0}
run: >
snakemake
--snakefile="workflow/Snakefile"
--configfile="tests/test1/config-Ubuntu.yml"
--use-conda
--conda-create-envs-only
--cores 1
all
- name: Install demonanalysis into the env (Ubuntu)
shell: bash -l {0}
run: |
for file in .snakemake/conda/*.yaml; do
if [ -f "$file" ]; then
if grep -q "name: warlock-r" "$file"; then
ENVPATH="${file%.yaml}"
break
fi
fi
done
conda deactivate
conda activate $ENVPATH
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)"
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)"
# Run the tests sequentially;
# This could be parallelized in the CI but setting up conda
# is expensive; its faster to run the tests one-by-one.
- name: Run the pipeline (test1) (Ubuntu)
shell: bash -l {0}
run: >
bash warlock.sh
--configfile tests/test1/config-Ubuntu.yml
--environment local
- name: Check md5 (test1) (Ubuntu)
shell: bash -l {0}
working-directory: ./tests/test1
run: md5sum -c output-Ubuntu.md5
- name: Cleanup (test1)
shell: bash -l {0}
run: rm -rf tests/test1/output
- name: Run the pipeline (test2) (Ubuntu)
shell: bash -l {0}
run: >
bash warlock.sh
--configfile tests/test2/config-Ubuntu.yml
--environment local
--cores 4
- name: Check md5 (test2) (Ubuntu)
shell: bash -l {0}
working-directory: ./tests/test2
run: md5sum -c output-Ubuntu.md5
- name: Cleanup (test2)
shell: bash -l {0}
run: rm -rf tests/test2/output
- name: Run the pipeline (test3) (Ubuntu)
shell: bash -l {0}
run: >
bash warlock.sh
--configfile tests/test3/config-Ubuntu.yml
--environment local
--cores 2
- name: Check md5 (test3) (Ubuntu)
shell: bash -l {0}
working-directory: ./tests/test3
run: md5sum -c output-Ubuntu.md5
- name: Cleanup (test3)
shell: bash -l {0}
run: rm -rf tests/test3/output
...