.gitlab-ci.yml 1.24 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
8
    - apt update -y && apt install python3-pip -y
    - pip3 install -r requirements.txt
    - pip3 install -r requirements-dev.txt
Sander Bollen's avatar
Sander Bollen committed
9

van den Berg's avatar
van den Berg committed
10
11
12
.singularity_before_script_anchor: &singularity_before_script_anchor
  before_script:
    - export BASETEMP=$RUN_BASE_DIR/$CI_COMMIT_REF_NAME/$CI_JOB_ID
13
14
15
    - source ${CONDA_SH}
    - conda activate hutspot-pipeline
    - export PATH=${PATH}:${SINGULARITY_PATH}
16
17
    - echo "$(which snakemake) --profile slurm-test \"\$@\"" > snakemake
    - chmod +x snakemake
18
    - export PATH=$(pwd):${PATH}
van den Berg's avatar
van den Berg committed
19
    - hash -r
20
    - which snakemake
21

van den Berg's avatar
van den Berg committed
22

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

test_sanities:
Sander Bollen's avatar
Sander Bollen committed
29
  <<: *docker_before_script_anchor
Sander Bollen's avatar
Sander Bollen committed
30
  script:
van den Berg's avatar
van den Berg committed
31
32
    - pytest-3 --tag sanity
  image: lumc/singularity-snakemake:3.5.2-5.9.1
Sander Bollen's avatar
Sander Bollen committed
33
34
  tags:
    - docker
Sander Bollen's avatar
Sander Bollen committed
35
  stage: sanity
Sander Bollen's avatar
Sander Bollen committed
36
37

test_dry_run:
Sander Bollen's avatar
Sander Bollen committed
38
  <<: *docker_before_script_anchor
Sander Bollen's avatar
Sander Bollen committed
39
  script:
van den Berg's avatar
van den Berg committed
40
41
    - pytest-3 --tag dry-run
  image: lumc/singularity-snakemake:3.5.2-5.9.1
Sander Bollen's avatar
Sander Bollen committed
42
43
  tags:
    - docker
Sander Bollen's avatar
Sander Bollen committed
44
45
  stage: dry-run

Sander Bollen's avatar
Sander Bollen committed
46

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