-
Notifications
You must be signed in to change notification settings - Fork 21
142 lines (126 loc) · 4.39 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
name: 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]
env:
NXF_ANSI_LOG: false
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true
jobs:
test:
name: Run pipeline with test data
# 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 == 'qbic-pipelines/rnadeseq') }}"
runs-on: ubuntu-latest
strategy:
matrix:
# Nextflow versions
NXF_VER:
- "23.04.0"
- "latest-everything"
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
- name: Check if Dockerfile or Conda environment changed
uses: technote-space/get-diff-action@v4
with:
FILES: |
Dockerfile
environment.yml
- name: Build new docker image
if: env.MATCHED_FILES
run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.4
# Change the version above and the third version below before/after release
- name: Pull docker image
if: ${{ !env.MATCHED_FILES }}
run: |
docker pull ghcr.io/qbic-pipelines/rnadeseq:dev
docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.4
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"
- name: Run pipeline with test data
run: nextflow run ${GITHUB_WORKSPACE} -profile test,docker
parameters:
name: Test workflow parameters
runs-on: ubuntu-latest
env:
NXF_VER: "23.04.0"
NXF_ANSI_LOG: false
strategy:
# This tells github to continue running other profile tests if some tests fail (default cancels all tests upon failure)
fail-fast: false
matrix:
config:
[
"test",
"test_full",
"test_contrast_matrix",
"test_contrast_list",
"test_no_multiqc",
"test_relevel",
"test_smrnaseq",
"test_star_rsem",
"test_star_salmon",
"test_use_vst",
"test_batcheffect",
"test_custom_gmt",
]
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
- name: Check if Dockerfile or Conda environment changed
uses: technote-space/get-diff-action@v4
with:
FILES: |
Dockerfile
environment.yml
- name: Build new docker image
if: env.MATCHED_FILES
run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.4
# Change the version above and the third version below before/after release
- name: Pull docker image
if: ${{ !env.MATCHED_FILES }}
run: |
docker pull ghcr.io/qbic-pipelines/rnadeseq:dev
docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.4
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: python -m pip install --upgrade pip pytest-workflow
- name: Run pipeline with tests settings
uses: Wandalen/[email protected]
with:
command: pytest --tag ${{ matrix.config }} --kwdof --git-aware --color=yes
attempt_limit: 3
- name: Output log on failure
if: failure()
run: |
sudo apt install bat > /dev/null
batcat --decorations=always --color=always /tmp/pytest_workflow_*/*/log.{out,err}
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v2
with:
name: logs-${{ matrix.profile }}
path: |
/tmp/pytest_workflow_*/*/.nextflow.log
/tmp/pytest_workflow_*/*/log.out
/tmp/pytest_workflow_*/*/log.err
/tmp/pytest_workflow_*/*/work
!/tmp/pytest_workflow_*/*/work/conda
!/tmp/pytest_workflow_*/*/work/singularity
/tmp/pytest_workflow_*/**/.command.log