forked from jdalrymple/gitbeaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (62 loc) · 1.5 KB
/
.travis.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
68
69
70
71
72
73
language: node_js
stages:
- lint
- build
- test
- release
notifications:
email: false
cache:
directories:
- dist
jobs:
include:
- stage: lint
node_js: node
script:
- npm run lint
- prettier --check './*.json' './*.yml'
- &build
stage: build
node_js: lts/*
script:
- npm run build
- <<: *build
node_js: node
- &test-unit
stage: test
node_js: lts/*
name: 'Unit Tests Latest LTS'
script:
- npm run test:unit -- --coverage
- npm run coverage
- &test-integration
stage: test
node_js: lts/*
name: 'Integration Tests Latest LTS'
before_script:
## Spin up container
- cd test/docker/
- docker-compose -f docker-compose.test.yml up -d
- sleep 260
- export PERSONAL_ACCESS_TOKEN=$(docker exec -it gitlab bash -lc 'printf "%q" "${PERSONAL_ACCESS_TOKEN}"')
- export GITLAB_URL=$(docker exec -it gitlab bash -lc 'printf "%q" "${GITLAB_URL}"')
- echo $GITLAB_URL
- echo $PERSONAL_ACCESS_TOKEN
script:
- npm run test:integration -- --coverage
- npm run coverage
- <<: *test-unit
name: 'Unit Tests Latest'
node_js: node
script:
- npm run test:unit
- <<: *test-integration
name: 'Integration Tests Latest'
node_js: node
script:
- npm run test:integration
- stage: release
node_js: node
script:
- npm run release