generated from 8bu/vitesse-enterprise
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
57 lines (50 loc) · 1.21 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
image: node:16.13.0-buster
before_script: &global_before_script
- curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6.22.2
- cd -- "$CI_PROJECT_DIR"
- pnpm config set store-dir .pnpm-store
- pnpm install
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- /root/.cache/Cypress
- .pnpm-store
- .npmrc
- node_modules/
variables:
npm_config_cache: '$CI_PROJECT_DIR/.npm'
CYPRESS_CACHE_FOLDER: '/root/.cache/Cypress'
PNPM_CACHE_FOLDER: '$CI_PROJECT_DIR/.pnpm-store'
stages:
- static-analysis
# - ct-test
- e2e-test
static-analysis:
stage: static-analysis
script:
- pnpm lint
# ct-test:
# stage: ct-test
# image:
# name: cypress/included:8.7.0
# entrypoint: ['']
# script:
# - pnpm cypress run-ct --browser=chrome
test:
stage: e2e-test
image:
name: cypress/included:8.7.0
entrypoint: ['']
script:
- pnpm build:prod:ssg
- pnpm vite preview --port 4000 &
- pnpm test:ci:e2e
coverage: '/Lines\s+:\s(\d+.?\d+)%/'
artifacts:
when: on_failure
paths:
- '$CI_PROJECT_DIR/tests/common/videos/*.mp4'
- '$CI_PROJECT_DIR/tests/screenshots/**/*.png'
- '$CI_PROJECT_DIR/coverage'
expire_in: 1 weeks
timeout: 15m