-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
34 lines (29 loc) · 1.06 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
image: node:14.15.1
cache: &global_cache
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
# should be a build artifact, but upload would take ~10min
- node_modules/
install:
stage: build
before_script:
# setup authentication via https URLs
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.inria.fr".insteadOf "ssh://[email protected]"
script:
# npm run as root: add --unsafe-perm to prevent cryptic blocking warning (…):
# npm WARN lifecycle [email protected]~prepack: cannot run in wd [email protected]~prepack
# <...> (wd=/builds/concordant/software/c-labbook/.npm/_cacache/tmp/git-clone-74e8bbe3)
- npm ci --cache .npm --prefer-offline --unsafe-perm
test:
stage: test
cache:
# inherit all global cache settings
<<: *global_cache
# pull only (test don't modify node_modules)
policy: pull
script:
# ignore react-scripts rejecting newer eslint
- SKIP_PREFLIGHT_CHECK=true npm run coverage
# regex for coverage measure
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/