-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
67 lines (58 loc) · 1.02 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
stages:
- build
- test
- e2e
- lint
- deploy
cache:
- paths:
- node_modules/
before_script:
- npm install
- npm run lint:fix
# build stage
build:
stage: build
image: node:latest
script:
- npm run build
# test stage
test:
stage: test
image: node:latest
script:
- npm run test
e2e:
stage: e2e
image: cypress/base
script:
# install cypress
- npx cypress install
# start the application in the background
- npm start &
# give time to start
- sleep 15
# run 2e2 tests
- npm run cy:run-e2e
# run eslint
lint:
stage: lint
image: node:latest
script:
- npm run lint:txt
artifacts:
paths:
- eslint-report.txt # Generate eslint-report.txt artifact for ESLint output
# deploy stage
deploy:
stage: deploy
script:
- npm install -g netlify-cli
- netlify --version
- npm run build
- npx netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --prod --dir build/
artifacts:
paths:
- build
only:
- main