mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-02-01 16:47:23 +00:00
72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
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
|