test(config): Updating test configuration to handle main versions of nodejs available

This commit is contained in:
Justin 2019-05-25 17:17:06 -04:00
parent 92467c57e6
commit bbd0b09cd1

View File

@ -1,8 +1,10 @@
language: node_js
stages:
- lint and build
- lint
- build
- test
- coverage
- release
notifications:
@ -10,31 +12,55 @@ notifications:
jobs:
include:
- stage: lint and build
node_js: 10.0.0
- stage: lint
node_js: 10.15.3
script:
- npm run lint
- npm run build
- prettier --check './*.json' './*.yml' './*.md'
- stage: test
node_js: 10.0.0
- &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
## Test for liveness
# - docker exec -it gitlab bash -lc 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost/-/readiness)" != "200" ]]; do sleep 5; done'
- sleep 240
- 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
- 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.0.0
node_js: 10.15.3
script:
- npm run semantic-release
- npm run release