1 | ### Stages
|
2 | ##
|
3 | #
|
4 | stages:
|
5 | - test
|
6 |
|
7 | ### Cache
|
8 | ## the key is "branch_name:job_name" to prevent incompatibilities between node versions
|
9 | #
|
10 | cache:
|
11 | key: "${CI_COMMIT_REF_NAME}:${CI_JOB_NAME}"
|
12 | paths:
|
13 | - node_modules/
|
14 |
|
15 | ### Jobs template
|
16 | ##
|
17 | #
|
18 | .test_template:
|
19 | stage: test
|
20 | script:
|
21 | - npm install
|
22 | - npm run lint
|
23 | - npm run test
|
24 | - npm run test-ldap
|
25 | retry: 2
|
26 |
|
27 | ### Services
|
28 | ##
|
29 | # Bring in any services we need
|
30 | # http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
31 | services:
|
32 | - rroemhild/test-openldap
|
33 |
|
34 | ### Jobs
|
35 | ##
|
36 | #
|
37 |
|
38 | ## Tests
|
39 | #
|
40 | test_node_latest:
|
41 | image: node:latest
|
42 | <<:
|
43 |
|
44 | test_node_4:
|
45 | image: node:4-stretch
|
46 | <<:
|
47 |
|
48 | test_node_6:
|
49 | image: node:6-stretch
|
50 | <<:
|
51 |
|
52 | test_node_8:
|
53 | image: node:8-stretch
|
54 | <<:
|
55 |
|
56 | test_node_9:
|
57 | image: node:9-stretch
|
58 | <<:
|
59 |
|
60 | test_node_10:
|
61 | image: node:10-buster
|
62 | <<:
|
63 |
|
64 | test_node_12:
|
65 | image: node:12-buster
|
66 | <<:
|