-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.gitlab-ci.yml
66 lines (56 loc) · 1.18 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
### Stages
##
#
stages:
- test
### Cache
## the key is "branch_name:job_name" to prevent incompatibilities between node versions
#
cache:
key: "${CI_COMMIT_REF_NAME}:${CI_JOB_NAME}"
paths:
- node_modules/
### Jobs template
##
#
.test_template: &test_definition
stage: test
script:
- npm install
- npm run frontend:build
- if [[ $(git status | grep -c "nothing to commit, working tree clean") -ne 1 ]]; then echo "*** You did’nt build the frontend! Aborting. Please run `make build` and commit ***"; exit 1; fi
- npm run lint
- npm run test
- npm run test-ldap
retry: 2
### Services
##
# Bring in any services we need
# http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
services:
- rroemhild/test-openldap
### Jobs
##
#
## Tests
#
test_node_latest:
image: node:latest
<<: *test_definition
test_node_8:
image: node:8-buster
<<: *test_definition
test_node_9:
image: node:9-stretch
before_script:
- npm install -g npm
<<: *test_definition
test_node_10:
image: node:10-buster
<<: *test_definition
test_node_12:
image: node:12-buster
<<: *test_definition
test_node_13:
image: node:13-buster
<<: *test_definition