-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
89 lines (84 loc) · 2.51 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
89 lines (84 loc) · 2.51 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never # Disables the branch pipeline if an MR is open
- if: $CI_PIPELINE_SOURCE == "merge_request_event" # Runs the MR pipeline instead
- if: $CI_COMMIT_BRANCH
stages:
- doc
- test
test-lint:
stage: test
image: "python:3.14"
needs: []
script:
- pip install ruff
- ruff check .
- ruff format --check .
when: always
test-package:
stage: test
needs: []
parallel:
matrix:
- IMAGE: ["python:3.10", "python:3.14"]
image: $IMAGE
before_script:
# missing dependencies for pyvista
- apt-get update && apt-get install libgl1 -y
script:
- export SAFE_IMAGE_NAME=$(echo "$IMAGE" | tr ':.' '_')
- pip install .[TEST]
- pytest --cov=. --cov-config=pyproject.toml --cov-report term
--cov-report xml:./tests/coverage_${SAFE_IMAGE_NAME}.xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
untracked: false
reports:
coverage_report:
coverage_format: cobertura
path: ./tests/coverage_*.xml
when: always
doc-build:
stage: doc
image: "python:3.14"
needs: []
rules:
- if: $CI_COMMIT_BRANCH == "main"
before_script:
- apt-get update && apt-get install git-lfs
- git lfs install
- pip install --upgrade pip
script:
- git config --global user.name "${GITLAB_USER_NAME}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
- git remote set-url origin https://gitlab-ci-token:${pyGCD_access_token}@gitlab.kit.edu/kit/fast/lb/collaboration/additive-manufacturing/pygcodedecode.git
- pip install git+https://github.com/jeknirsch/pydoc-markdown.git@sort_modules
- pip install -e .[DOCS]
- pydoc-markdown
- cd docs
- mkdocs gh-deploy --force
artifacts:
untracked: false
paths:
- ./docs/site/
- ./docs/content/*.md
when: always
expire_in: "30 days"
doc-compile_paper:
stage: doc
needs: []
rules:
- when: manual
allow_failure: true
tags:
- shell
script:
- docker run --rm --volume $PWD/paper:/data --user $(id -u):$(id -g)
--env JOURNAL=joss openjournals/inara
artifacts:
untracked: false
paths:
- ./paper/*.pdf
when: always
expire_in: "30 days"