UNPKG

1.21 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 - 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
24 - npm run lint
25 - npm run test
26 - npm run test-ldap
27 retry: 2
28
29### Services
30##
31# Bring in any services we need
32# http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
33services:
34 - rroemhild/test-openldap
35
36### Jobs
37##
38#
39
40## Tests
41#
42test_node_latest:
43 image: node:latest
44 <<: *test_definition
45
46test_node_8:
47 image: node:8-buster
48 <<: *test_definition
49
50test_node_9:
51 image: node:9-stretch
52 before_script:
53 - npm install -g npm
54 <<: *test_definition
55
56test_node_10:
57 image: node:10-buster
58 <<: *test_definition
59
60test_node_12:
61 image: node:12-buster
62 <<: *test_definition
63
64test_node_13:
65 image: node:13-buster
66 <<: *test_definition