-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (47 loc) · 1.61 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
# Copyright © 2023 German Cancer Research Center (DKFZ), Division of Medical Image Computing
#
# SPDX-License-Identifier: Apache-2.0
stages:
- lint
- test
license_compliance:
image: python:3.10
stage: lint
before_script:
- pip install --upgrade pip
- pip install reuse
script:
- reuse lint
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
.default_before_script: &default_before_script
- apt-get update && apt-get install libgl1 git-lfs -y
- pip install --upgrade pip
- pip install numpy # actually installed via pyproject.toml but pyradiomics requires it already during installation
- pip install pytest
test_pytest:
image: python:${VERSION}
parallel:
matrix:
- VERSION: ["3.9", "3.10", "3.11"] #, "3.12", "latest" ]
stage: test
before_script:
- *default_before_script
script:
- pip install .
- pytest -v -s tests/ # -k "features"
#artifacts:
# paths:
# - tests/test_results/
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
test_run_parcellate:
extends: test_pytest
before_script:
- *default_before_script
- pip install .
- mkdir tests/test_results/ -p
script:
- radtract_parcellate --streamlines tests/test_data/test_tract.trk --envelope tests/test_data/test_tract_envelope.nii.gz --start tests/test_data/test_tract_b.nii.gz --num_parcels 5 --output tests/test_results/hyperplane_parcellation_command.nii.gz
- radtract_features --parcellation tests/test_results/hyperplane_parcellation_command.nii.gz --map tests/test_data/test_map.nii.gz --output tests/test_results/hyperplane_parcellation_command.csv