-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
44 lines (37 loc) · 995 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
# first, install Cypress, then run all tests (in parallel)
# stages:
# - build
# - test
# to cache both npm modules and Cypress binary we use environment variables
# to point at the folders we can list as paths in "cache" job settings
variables:
npm_config_cache: "$CI_PROJECT_DIR/.npm"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
MONGODB_URI: 'mongodb://mongo/conduit'
# cache using branch name
# https://gitlab.com/help/ci/caching/index.md
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm
- cache/Cypress
- node_modules
services:
- mongo:latest
# this job installs NPM dependencies and Cypress
# install:
# image: cypress/base:10
# stage: build
# script:
# - npm run dev:install
# - npm run cy:verify
run_test:
image: cypress/base:10
stage: build
script:
- npm run dev:install
- npm run cy:verify
# - npm run mongo:restore:ci
- nohup npm run dev:run &
- npm run wait-for-server
- npm run e2e_mochawesome