forked from jdalrymple/gitbeaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
71 lines (58 loc) · 1.46 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
language: node_js
stages:
- lint
- test
- release
notifications:
email: false
env:
- GITLAB_URL=http://localhost:8080
jobs:
include:
- stage: lint
node_js: node
script:
- npm run lint
- prettier --check './*.json' './*.yml'
- stage: test
name: Unit Test LFS
node_js: lts/*
script:
- npm run test:unit
- stage: test
name: Unit Test Latest
node_js: node
script:
- npm run test:unit -- --coverage
after_success:
- npm run coverage
- &test-integration
stage: test
name: Integration Test LFS
node_js: lts/*
before_script:
- cd test/docker/
# Spin up container
- docker-compose -f docker-compose.test.yml up -d
# Verify Gitlab instance is up and running
- node test_readiness.js
# Get the personal token
- export PERSONAL_ACCESS_TOKEN=$(docker exec -it gitlab bash -lc 'printf "%q" "$(gitlab-rails r /tmp/init_data.rb)"')
# Display configuration
- echo $PERSONAL_ACCESS_TOKEN
script:
- npm run build
- npm run test:integration
- <<: *test-integration
name: Integration Test Latest
node_js: node
script:
- npm run build
- npm run test:integration -- --coverage
after_success:
- npm run coverage
- stage: release
node_js: node
script:
- npm run build
- npm run release