-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
67 lines (61 loc) · 1.6 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
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
# image: node:latest
image: node:16.12.0
# # Pick zero or more services to be used on all builds.
# # Only needed when using a docker container to run your tests in.
# # Check out: http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# services:
# - mysql:latest
# - redis:latest
# - postgres:latest
# This folder is cached between builds
# http://docs.gitlab.com/ee/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
# - coverage/
# - dist/
stages:
- build
- test
# - run
build_app:
artifacts:
paths:
- dist/
expire_in: never
stage: build
script:
- yarn --frozen-lockfile
# below line /should not/ be needed, as prebuild /should/ run prior to build on its own
# - yarn prebuild
- yarn build
run_unit_tests:
artifacts:
paths:
- coverage/
expire_in: never
# deps in this file should only be used to pass directly between jobs, caching is used otherwise
# dependencies:
# - build_app
stage: test
script:
- yarn --frozen-lockfile
- yarn test
# - node ./specs/start.js ./specs/async.spec.js
# run_app:
# stage: run
# script:
# - yarn start:prod
# build_and_run_app:
# stage: run
# script:
# - yarn
# - yarn prebuild
# - yarn build
# - yarn start:prod
# test_db:
# script:
# - yarn
# - node ./specs/start.js ./specs/db-postgres.spec.js