mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-02-01 16:47:23 +00:00
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
language: node_js
|
|
|
|
stages:
|
|
- prepare cache
|
|
- lint
|
|
- build
|
|
- setup test docker
|
|
- test
|
|
|
|
jobs:
|
|
include:
|
|
- stage: prepare cache
|
|
node_js: node
|
|
script: true
|
|
cache:
|
|
directories:
|
|
- node_modules # NPM packages
|
|
|
|
- stage: lint
|
|
node_js: node
|
|
script: npm run lint
|
|
|
|
- stage: build
|
|
node_js: node
|
|
script: npm run build
|
|
|
|
- stage: setup test docker
|
|
script:
|
|
## Spin up container
|
|
- cd test/docker/
|
|
- docker-compose -f docker-compose.test.yml up -d
|
|
|
|
## Sleep before performing commands on container
|
|
- sleep 240
|
|
|
|
## Get the docker env variables
|
|
- 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}"')
|
|
|
|
- stage: test
|
|
script: npm run test
|
|
node_js: 8
|
|
|
|
- stage: test
|
|
script: npm run test
|
|
node_js: lts/*
|
|
|
|
- stage: test
|
|
script: npm run test
|
|
node_js: 9
|
|
|
|
- stage: test
|
|
script: npm run test
|
|
node_js: node |