-
Notifications
You must be signed in to change notification settings - Fork 49
267 lines (246 loc) · 10.9 KB
/
ci.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
name: nf-core CI
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
on:
push:
branches:
- dev
pull_request:
release:
types: [published]
# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
##############################
### SMALL INTEGRATION TEST ###
##############################
test:
name: Run standard pipeline test
# Only run on push if this is the nf-core dev branch (merged PRs)
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}"
runs-on: ubuntu-latest
env:
NXF_VER: ${{ matrix.NXF_VER }}
NXF_ANSI_LOG: false
CAPSULE_LOG: none
strategy:
matrix:
NXF_VER: ["23.04.0", ""]
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
# Work around for the unexpected end of file error that github actions seems to get when downloading compressed
# files during pipeline execution
- name: Download data
run: |
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20.fa.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-bowtie2.tar.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.gtf.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.bed.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.fa.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.tar.gz
- name: Run Pipeline
uses: Wandalen/[email protected]
with:
command: nextflow run ${GITHUB_WORKSPACE} -profile docker,test_local_zip
attempt_limit: 2
##############################
### LARGE INTEGRATION TEST ###
##############################
test_full_small:
name: Run extended pipeline test
# Only run on push if this is the nf-core dev branch (merged PRs)
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
runs-on: ubuntu-latest
env:
NXF_VER: ${{ matrix.nxf_ver }}
NXF_ANSI_LOG: false
CAPSULE_LOG: none
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
NXF_VER: ["23.04.0", ""]
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
# Work around for the unexpected end of file error that github actions seems to get when downloading compressed
# files during pipeline execution
- name: Download data
run: |
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20.fa.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-bowtie2.tar.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.gtf.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.bed.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.fa.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.tar.gz
- name: Run Pipeline
uses: Wandalen/[email protected]
with:
command: nextflow run ${GITHUB_WORKSPACE} -profile docker,test_full_small_local_zip
attempt_limit: 2
#####################################
### EDGE VERSION INTEGRATION TEST ###
#####################################
test_edge:
name: Run standard pipeline test (edge version)
# Only run on push if this is the nf-core dev branch (merged PRs)
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
runs-on: ubuntu-latest
env:
NXF_ANSI_LOG: false
CAPSULE_LOG: none
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "latest-everything"
# Work around for the unexpected end of file error that github actions seems to get when downloading compressed
# files during pipeline execution
- name: Download data
run: |
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20.fa.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-bowtie2.tar.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.gtf.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.bed.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.fa.gz
wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.tar.gz
- name: Run Pipeline
uses: Wandalen/[email protected]
with:
command: nextflow run ${GITHUB_WORKSPACE} -profile docker,test_local_zip
attempt_limit: 2
##############################
### UNIT TESTS ###
##############################
unit_tests:
name: ${{ matrix.NXF_VER }} ${{ matrix.tags }}
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
runs-on: ubuntu-20.04
env:
NXF_VER: ${{ matrix.NXF_VER }}
NXF_ANSI_LOG: false
CAPSULE_LOG: none
strategy:
fail-fast: false
matrix:
NXF_VER: ["23.04.0", ""]
tags:
- test_genome_options
- test_genome_options_spikein
- test_samplesheet
- test_samplesheet_2
- test_samplesheet_3
- test_filtering_noqfilter
- test_filtering_withqfilter
- test_bam_scale_none
- test_bam_scale_spikein
- test_bam_scale_cpm
- test_bam_scale_rpkm
- test_bam_scale_bpm
- test_bam_scale_cpm_iggscale
- test_peak_callers_seacr
- test_peak_callers_macs2
- test_peak_callers_invalid
- test_peak_callers_seacr_macs2
- test_peak_callers_macs2_seacr
- test_peak_callers_seacr_macs2_noigg
- test_peak_callers_ctrl_tests
- test_consensus_peaks_group
- test_consensus_peaks_all
- test_consensus_peaks_invalid
- verify_output_only_input
- verify_output_save_merged
- verify_output_save_trimmed
- verify_output_skip_trimming
- verify_output_skip_fastqc
- verify_output_save_ref
- verify_output_align_only_align
- verify_output_align_only_align_end_to_end
- verify_output_align_only_align_local
- verify_output_align_intermed
- verify_output_align_save_spikein_align
- verify_output_align_save_unaligned
- verify_output_align_duplicates_mark
- verify_output_align_duplicates_remove
- verify_output_align_duplicates_remove_target
- verify_output_align_linear_duplicates_remove
- verify_output_align_linear_duplicates_remove_target
- verify_output_only_filtering
- verify_output_only_filtering_with_mitochondrial_reads
- verify_output_only_filtering_without_mitochondrial_reads
- verify_output_only_filtering_without_mitochondrial_reads_mito_name_null
- verify_output_peak_calling_only_peak_calling
- verify_output_reporting_skip_preseq_false
- verify_output_reporting_skip_preseq_true
- verify_output_reporting_skip_dtqc_false
- verify_output_reporting_skip_dtqc_true
- verify_output_reporting_skip_heatmaps_false
- verify_output_reporting_skip_heatmaps_true
- verify_output_reporting_skip_heatmaps_grouped
- verify_output_reporting_skip_igv_false
- verify_output_reporting_skip_igv_true
- verify_output_reporting_skip_multiqc_false
- verify_output_reporting_skip_multiqc_true
- verify_output_reporting_skip_peak_qc_false
- verify_output_reporting_skip_peak_qc_true
- verify_output_reporting_skip_reporting
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Setup Pip Cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: python -m pip install --upgrade pip pytest-workflow
- name: Restore Keys
uses: actions/cache@v3
with:
path: /usr/local/bin/nextflow
key: ${{ runner.os }}-nextflow-${{ matrix.nxf_version }}
restore-keys: |
${{ runner.os }}-nextflow-
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Run pytest-workflow
uses: Wandalen/[email protected]
with:
command: TMPDIR=~ PROFILE=docker pytest --tag ${{ matrix.tags }} --symlink --kwdof --color=yes
attempt_limit: 3
- name: Output log on failure
if: failure()
run: |
sudo apt install bat > /dev/null
batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err}
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v2
with:
name: logs-unit-tests
path: |
/home/runner/pytest_workflow_*/*/.nextflow.log
/home/runner/pytest_workflow_*/*/log.out
/home/runner/pytest_workflow_*/*/log.err
/home/runner/pytest_workflow_*/*/work
!/home/runner/pytest_workflow_*/*/work/conda
!/home/runner/pytest_workflow_*/*/work/singularity