.gitlab-ci.yml 1.38 KB
Newer Older
Sander Bollen's avatar
Sander Bollen committed
1
2
3
variables:
  GIT_SUBMODULE_STRATEGY: recursive

Sander Bollen's avatar
Sander Bollen committed
4
5
.docker_before_script_anchor: &docker_before_script_anchor
  before_script:
van den Berg's avatar
van den Berg committed
6
7
    - pip3 install -r requirements.txt
    - pip3 install -r requirements-dev.txt
Sander Bollen's avatar
Sander Bollen committed
8

van den Berg's avatar
van den Berg committed
9
10
11
.singularity_before_script_anchor: &singularity_before_script_anchor
  before_script:
    - export BASETEMP=$RUN_BASE_DIR/$CI_COMMIT_REF_NAME/$CI_JOB_ID
12
    - source ${CONDA_SH}
13
    - conda activate hutspot-pipeline || conda create -n hutspot-pipeline --file requirements.txt --file requirements-dev.txt -y && conda activate hutspot-pipeline
14
    - export PATH=${PATH}:${SINGULARITY_PATH}
15
16
    - echo "#!/usr/bin/env bash" > snakemake
    - echo "$(which snakemake) --profile slurm-test \"\$@\"" >> snakemake
17
    - chmod +x snakemake
18
    - export PATH=$(pwd):${PATH}
van den Berg's avatar
van den Berg committed
19
    - hash -r
20

van den Berg's avatar
van den Berg committed
21

Sander Bollen's avatar
Sander Bollen committed
22
23
24
25
stages:
  - sanity
  - dry-run
  - integration
Sander Bollen's avatar
Sander Bollen committed
26
27

test_sanities:
Sander Bollen's avatar
Sander Bollen committed
28
  <<: *docker_before_script_anchor
Sander Bollen's avatar
Sander Bollen committed
29
  script:
Ruben Vorderman's avatar
Ruben Vorderman committed
30
    - pytest --tag sanity --workflow-threads 8
Ruben Vorderman's avatar
Ruben Vorderman committed
31
  image: lumc/singularity-snakemake:3.5.2-5.15.0
Sander Bollen's avatar
Sander Bollen committed
32
33
  tags:
    - docker
Sander Bollen's avatar
Sander Bollen committed
34
  stage: sanity
Sander Bollen's avatar
Sander Bollen committed
35
36

test_dry_run:
Sander Bollen's avatar
Sander Bollen committed
37
  <<: *docker_before_script_anchor
Sander Bollen's avatar
Sander Bollen committed
38
  script:
Ruben Vorderman's avatar
Ruben Vorderman committed
39
    - pytest --tag dry-run --workflow-threads 8
Ruben Vorderman's avatar
Ruben Vorderman committed
40
  image: lumc/singularity-snakemake:3.5.2-5.15.0
Sander Bollen's avatar
Sander Bollen committed
41
42
  tags:
    - docker
Sander Bollen's avatar
Sander Bollen committed
43
44
  stage: dry-run

Sander Bollen's avatar
Sander Bollen committed
45

Sander Bollen's avatar
Sander Bollen committed
46
test_integration:
van den Berg's avatar
van den Berg committed
47
  <<: *singularity_before_script_anchor
Sander Bollen's avatar
Sander Bollen committed
48
  script:
49
    - pytest --tag integration --basetemp ${BASETEMP} --keep-workflow-wd
Sander Bollen's avatar
Sander Bollen committed
50
51
  tags:
    - slurm
Sander Bollen's avatar
Sander Bollen committed
52
  stage: integration