-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
50 lines (44 loc) · 884 Bytes
/
.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
image: node:16.17.1
# Set environment variables for folders in "cache" job settings for npm modules and Cypress binary
variables:
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- frontend/build/
- backend/dist/
- frontend/node_modules
- backend/node_modules
- cache/*
- cache/Cypress
stages:
- frontend-build
- backend-build
- frontend-test
frontend:build:
stage: frontend-build
script:
- cd frontend
- npm ci
- npm run lint
- npm run format
- npm run build
artifacts:
paths:
- frontend/build
backend:build:
stage: backend-build
script:
- cd backend
- npm ci
- npm run lint
- npm run build
artifacts:
paths:
- backend/dist
frontend:test:
stage: frontend-test
script:
- cd frontend
- npm ci
- npm run test:unit