-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.gitlab-ci.yml
78 lines (71 loc) · 1.31 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
69
70
71
72
73
74
75
76
77
image: node:20
stages:
- test
- build
- deploy
- package
- release
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- node_modules/
test:
image: trion/ng-cli-karma
stage: test
script:
- npm install
- npm run test:ci
coverage: '/^Statements\s*:\s*([^%]+)/'
artifacts:
paths:
- coverage/
- test-report/*.xml
reports:
junit: test-report/*.xml
except:
variables:
- $TEST_DISABLED
build:
stage: build
script:
- npm install -g @angular/cli
- npm install
- npm run build:prod
artifacts:
paths:
- dist/
package:
stage: package
dependencies:
- build
script:
- ./package.sh
artifacts:
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
paths:
- "*.tar.gz"
rules:
- if: $CI_COMMIT_TAG
when: on_success
allow_failure: false
- if: $CI_MERGE_REQUEST_ID
when: never
- when: manual
allow_failure: true
# store and publish code coverage HTML report folder
pages:
stage: deploy
needs:
- test
script:
# delete everything in the current public folder
# and replace with code coverage HTML report
- rm -rf public/coverage
- mkdir -p public/coverage
- cp -R coverage/lcov-report/* public/coverage
artifacts:
paths:
- public
expire_in: 30 days
only:
- test