@@ -6,18 +6,19 @@ workflow:
6
6
variables :
7
7
PACKAGE_BASE_NAME : gnatcoverage.tar.gz
8
8
PACKAGE_ABSOLUTE_NAME : $CI_PROJECT_DIR/$PACKAGE_BASE_NAME
9
- GITLAB_REMOTE : " https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/"
10
9
11
10
include :
11
+ - component : $CI_SERVER_FQDN/eng/gitlab-templates/pre-commit@~latest
12
+ inputs :
13
+ stage : test
12
14
# TODO: workaround to allow dynamically setting the interruptible policy until https://gitlab.com/gitlab-org/gitlab/-/issues/194023 is implemented
13
15
- local : utils/ci/interruptible.yml
14
16
rules :
15
- - if : $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
17
+ - if : $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
16
18
- project : eng/codepeer/ci-registry
17
19
file : /gnatsas-on-gnatcov.yml
18
20
19
21
.basic_setup : &basic_setup
20
- - unset GITLAB_TOKEN
21
22
- generic_anod_ci --add-dep eng/das/cov/gnatcoverage-extra
22
23
- cat /tmp/ci_env.sh
23
24
- . /tmp/ci_env.sh
@@ -205,20 +206,10 @@ test_spark:
205
206
206
207
<< : *artifacts
207
208
208
- stylechecks :
209
- interruptible : true
210
- stage : test
211
- services :
212
- - image:pe-base
213
- - run_as_root:false
214
- needs : []
215
- script :
216
- - *basic_setup
217
209
218
- - git config --global --add
219
- url."${GITLAB_REMOTE}".insteadOf "git@ssh.gitlab.adacore-it.com:"
220
- - git config --global --add
221
- url."${GITLAB_REMOTE}".insteadOf "ssh://git@ssh.gitlab.adacore-it.com/"
210
+ pre-commit :
211
+ before_script :
212
+ - *basic_setup
222
213
223
214
# Install the clang-format executable and make it available
224
215
- anod install libclang -Qstable
@@ -229,14 +220,9 @@ stylechecks:
229
220
- . /tmp/venv/bin/activate
230
221
- python -m pip install colorama pre-commit
231
222
232
- - cd $CI_PROJECT_DIR
233
-
234
- - pre-commit install
235
- - pre-commit install-hooks
236
- - pre-commit run -a --show-diff-on-failure
237
-
238
223
- python .check-formatting.py --force-colors
239
224
225
+
240
226
# ################
241
227
# Optional jobs #
242
228
# ################
0 commit comments