UNPKG

1.4 kBYAMLView Raw
1### Stages
2##
3#
4stages:
5 - test
6
7### Cache
8## the key is "branch_name:job_name" to prevent incompatibilities between node versions
9#
10cache:
11 key: "${CI_COMMIT_REF_NAME}:${CI_JOB_NAME}"
12 paths:
13 - node_modules/
14
15### Jobs template
16##
17#
18.test_template: &test_definition
19 stage: test
20 script:
21 - npm install
22 - npm run frontend:build
23 - git status
24 - git checkout -- package-lock.json
25 - 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
26 - npm run lint
27 - npm run test
28 - npm run test-ldap
29 retry: 2
30
31### Services
32##
33# Bring in any services we need
34# http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
35services:
36 - rroemhild/test-openldap
37
38### Jobs
39##
40#
41
42## Tests
43#
44# test_node_latest:
45# image: node:latest
46# <<: *test_definition
47
48test_node_8:
49 image: node:8-buster
50 <<: *test_definition
51
52test_node_9:
53 image: node:9-stretch
54 before_script:
55 - npm install -g npm
56 <<: *test_definition
57
58test_node_10:
59 image: node:10-buster
60 <<: *test_definition
61
62test_node_12:
63 image: node:12-buster
64 <<: *test_definition
65
66test_node_13:
67 image: node:13-buster
68 <<: *test_definition
69
70test_node_14:
71 image: node:14-buster
72 <<: *test_definition
73
74# test_node_15:
75# image: node:15-buster
76# <<: *test_definition