-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
109 lines (102 loc) · 2.11 KB
/
.gitlab-ci.yml
File metadata and controls
109 lines (102 loc) · 2.11 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
stages:
- test # このステージの名前は include している設定で使用されるため変更不可
- build
- test after build
- deploy
include:
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
- template: Jobs/Secret-Detection.gitlab-ci.yml
variables:
SPHINX_IMAGE: musicscience37/sphinx-doxygen:gcc13
pre-commit:
stage: test
needs: []
image: ${SPHINX_IMAGE}
variables:
POETRY_CACHE_DIR: ${CI_PROJECT_DIR}/.poetry-cache
script:
- poetry config virtualenvs.in-project true
- poetry env use 3.13
- poetry sync
- poetry run pre-commit run --all-files
cache:
- key:
prefix: poetry
files:
- poetry.lock
paths:
- .poetry-cache
spell check:
stage: test
needs: []
image: node
script:
- npm install -g cspell
- cspell lint .
interruptible: true
build:
stage: build
needs:
- pre-commit
dependencies: []
image: ${SPHINX_IMAGE}
variables:
PYDEVD_DISABLE_FILE_VALIDATION: 1
POETRY_CACHE_DIR: ${CI_PROJECT_DIR}/.poetry-cache
script:
- poetry config virtualenvs.in-project true
- poetry env use 3.13
- poetry sync
- poetry run ./build.sh
cache:
- key:
prefix: poetry
files:
- poetry.lock
paths:
- .poetry-cache
- key:
prefix: jupyter
files:
- poetry.lock
paths:
- build/jupyter_cache
artifacts:
paths:
- build/html
expire_in: "1 week"
check html:
stage: test after build
needs:
- build
dependencies:
- build
image: ubuntu
script:
- apt-get update
- apt-get install -y curl
- mkdir -p /usr/local/bin
- curl https://htmltest.wjdp.uk | bash -s -- -b /usr/local/bin
- htmltest
cache:
- key: htmltest
paths:
- .htmltest
# htmltest は不安定なため、失敗しても残りの処理は続ける。
allow_failure: true
pages:
stage: deploy
needs:
- pre-commit
- spell check
- build
dependencies:
- build
image: alpine
script:
- mv build/html public
artifacts:
paths:
- public
only:
- main