forked from hitabisgmbh/oaklean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
68 lines (59 loc) · 1.21 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: never # Prevent pipeline run for push event
- when: always # Run pipeline for all other cases
cache:
paths:
- node_modules/
default:
image: node:20.11.1
before_script:
- npm ci
stages:
- build
- test
- generate-docs
- deploy
build:
stage: build
artifacts:
expire_in: 1 week
paths:
- ./packages/profiler/dist
- ./packages/profiler-core/dist
- ./packages/profiler-jest-environment/*.js
- ./packages/cli/dist
- ./packages/windows-sensorinterface/dist
script:
- npm run build
lint:
stage: build
script:
- npm run lint
test:
stage: test
script:
- npm run test
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
after_script:
- mv ./profiles/jest/accumulated-*.oak ./
artifacts:
expire_in: 1 week
paths:
- ./accumulated-*.oak
generate-docs:
stage: generate-docs
script:
- npm run generate-docs && [[ -z "$(git status -s)" ]]
deploy:
stage: deploy
dependencies:
- build
variables:
NODE_ENV: production
only:
- /^release.*$/
script:
- echo -e "${PRIVATE_REGISTRY}${CI_JOB_TOKEN}">.npmrc
- npm run publish-registry