-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
103 lines (94 loc) · 2.03 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
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
image: node:10.13-alpine
stages:
- install
- build_test
- publish
install:
stage: install
retry: 2
variables:
YARN_CACHE_FOLDER: yarn
artifacts:
paths:
- node_modules/
cache:
paths:
- yarn/
script:
- yarn install --pure-lockfile --production=false
test:
stage: build_test
dependencies:
- install
script: yarn test:coverage
after_script:
- './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov'
- './node_modules/.bin/codecov'
# audit:
# stage: build_test
# allow_failure: true
# dependencies:
# - install
# script: yarn audit
lint:
stage: build_test
dependencies:
- install
script: yarn lint
typecheck:
stage: build_test
dependencies:
- install
script: yarn typecheck
build:
stage: build_test
dependencies:
- install
script: yarn build
artifacts:
paths:
- dist/
build api:
stage: build_test
only:
- master
dependencies:
- install
script: yarn build:api
artifacts:
paths:
- api/
npm publish:
stage: publish
only:
- tags
dependencies:
- install
- build
script:
- npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- npm publish
# api publish:
# image: indiehosters/git
# stage: publish
# only:
# - master
# dependencies:
# - build api
# before_script:
# - git config --global user.email "api@generator"
# - git config --global user.name "API generator"
# - git remote set-url origin [email protected]:jkelin/spa-prod.git
# - mkdir -p ~/.ssh/
# - echo "$API_GENERATOR_SSH" > ~/.ssh/id_rsa
# - echo "$API_GENERATOR_SSH_PUB" > ~/.ssh/id_rsa.pub
# - chmod 600 ~/.ssh/id_rsa
# script:
# - mv api ../api
# - git checkout --orphan gh-pages
# - git reset --hard
# - mv ../api/* ./
# - rm -rf ../api
# - git add -A
# - git commit -m "Generate API docs"
# - git push -f --no-verify origin gh-pages