.gitlab-ci.yml 1.26 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}
van den Berg's avatar
van den Berg committed
16
    - echo $BASETEMP
17
18
19
20
21
22
    - echo $PATH
    - which snakemake
    - echo "$(which snakemake) --profile slurm-test \"\$@\"" > snakemake
    - chmod +x snakemake
    - export PATH=.:${PATH}

van den Berg's avatar
van den Berg committed
23

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

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

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

Sander Bollen's avatar
Sander Bollen committed
47

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