-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
62 lines (57 loc) · 2.7 KB
/
.gitlab-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
# Include shared CI
include:
- project: "epi2melabs/ci-templates"
file: "wf-containers.yaml"
variables:
# Workflow inputs given to nextflow.
# The workflow should define `--out_dir`, the CI template sets this.
# Only common file inputs and option values need to be given here
# (not things such as -profile)
CI_FLAVOUR: "new"
NF_WORKFLOW_OPTS: "-executor.\\$$local.memory 16GB --fastq test_data/fastq \
--reference_genome test_data/grch38/grch38_chr19_22.fa.gz \
--targets test_data/targets.bed --full_report --threads 4"
docker-run:
tags: []
# Define a 1D job matrix to inject a variable named MATRIX_NAME into
# the CI environment, we can use the value of MATRIX_NAME to determine
# which options to apply as part of the rules block below
# NOTE There is a slightly cleaner way to define this matrix to include
# the variables, but it is broken when using long strings! See CW-756
parallel:
matrix:
- MATRIX_NAME: ["multi-sample", "one-sample", "integration-test"]
rules:
# NOTE As we're overriding the rules block for the included docker-run
# we must redefine this CI_COMMIT_BRANCH rule to prevent docker-run
# being incorrectly scheduled for "detached merge request pipelines" etc.
- if: ($CI_COMMIT_BRANCH == null || $CI_COMMIT_BRANCH == "dev-template")
when: never
- if: $MATRIX_NAME == "multi-sample"
variables:
NF_WORKFLOW_OPTS:
"-executor.\\$$local.memory 16GB --fastq test_data/fastq \
--reference_genome test_data/grch38/grch38_chr19_22.fa.gz \
--targets test_data/targets.bed --full_report --threads 4"
- if: $MATRIX_NAME == "one-sample"
variables:
NF_WORKFLOW_OPTS:
"-executor.\\$$local.memory 16GB --fastq 'test_data/fastq/sample_2/sample_2 ontarget.fastq.gz' \
--reference_genome test_data/grch38/grch38_chr19_22.fa.gz \
--targets test_data/targets.bed --full_report --threads 4"
- if: $MATRIX_NAME == "integration-test"
variables:
NF_WORKFLOW_OPTS:
"-executor.\\$$local.memory 16GB --fastq test/data/fastq/ \
--reference_genome test/data/cas9_integration.fa \
--targets test/data/cas9_integration.bed --full_report --threads 4"
integration_test:
extends: .setup-alpine-nextflow
dependencies: ["docker-run: [integration-test]"]
stage: post-test
script:
- echo "ls" && ls
- ls wf-cas9
- SHA=$(./nextflow config -properties|grep ${PYTEST_CONTAINER_CONFIG_KEY}|awk -F= '{print $2}')
- IMAGE="${DOCKERHUB_NAMESPACE}/${CI_PROJECT_NAME}:${SHA}"
- docker run -u $(id -u) -v ${PWD}:/host $IMAGE pytest /host/test/workflow_integration.py;