-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
70 lines (61 loc) · 1.3 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
image: node:20
cache: # Cache modules in between jobs
key: $CI_COMMIT_REF_SLUG
paths:
- .npm/
before_script:
- npm run setup:ci
stages:
- test-unit
- test-e2e
# - test-server
- lint
- lint-css
- build
# Only showing coverage for unit tests
unit-test-job:
stage: test-unit
script:
- echo "Running unit tests..."
- cd client
- npm run coverage
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
artifacts:
when: always
paths:
- ./client/coverage/
reports:
junit: ./client/coverage/junit.xml
e2e-test-job:
stage: test-e2e
image: mcr.microsoft.com/playwright:v1.39.0-jammy
script:
- echo "Running e2e tests..."
- cd client
- npm run test:e2e:ci
# Skipping since "libcrypto.so.1.1" is missing in image node:20
# server-test-job:
# stage: test-server
# script:
# - echo "Running unit tests..."
# - cd server
# - npm run test
lint-test-job 1/2:
stage: lint
script:
- echo "Linting code..."
- npm run lint
- echo "No lint issues found."
lint-test-job 2/2:
stage: lint-css
script:
- echo "Linting code..."
- npm run lint:style
- echo "No lint issues found."
build-client:
stage: build
script:
- echo "Compiling the code..."
- cd client
- npm run build
- echo "Compile complete."