gitbeaker/.travis.yml

67 lines
1.4 KiB
YAML

language: node_js
stages:
- lint
- build
- test
- coverage
- release
notifications:
email: false
jobs:
include:
- stage: lint
node_js: 10.15.3
script:
- npm run lint
- prettier --check './*.json' './*.yml' './*.md'
- &build
stage: build
node_js: 10.15.3
script:
- npm run build
- <<: *build
node_js: 8.9.0
- &test-unit
stage: test
node_js: 10.15.3
name: 'Unit Tests 10.15.3'
script:
- npm run test:unit
- <<: *test-unit
name: 'Unit Tests 8.9.0'
node_js: 8.9.0
- &test-integration
stage: test
node_js: 10.15.3
name: 'Integration Tests 10.15.3'
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
- <<: *test-integration
name: 'Integration Tests 8.9.0'
node_js: 8.9.0
- stage: coverage
node_js: 10.15.3
script:
- npm run coverage
- stage: release
node_js: 10.15.3
script:
- npm run release