Updating travis

This commit is contained in:
Justin 2018-05-16 23:35:05 -04:00
parent 8f18780c86
commit 95b8081d0c
6 changed files with 11 additions and 4 deletions

View File

@ -11,19 +11,22 @@ cache:
## Spin up glitlab instance and sleep for 60 seconds
before_script:
## Spin up container
- cd test/docker/
- docker-compose -f docker-compose.test.yml up
- cd .
## Get the docker env variables
- export PERSONAL_ACCESS_TOKEN=$(docker exec -i gitlab echo PERSONAL_ACCESS_TOKEN)
- export GITLAB_URL=$(docker exec -i gitlab echo PERSONAL_ACCESS_TOKEN)
- export GITLAB_URL=$(docker exec -i gitlab echo GITLAB_URL)
## Sleep before performing commands on container
- sleep 10000
- sleep 30
## run tests
script:
- npm run test:infrastructure
- npm run test:bundles
- npm run test:services
after_script:
- docker-compose -f docker-compose.test.yml down
@ -34,4 +37,3 @@ jobs:
script: npm run lint
- stage: build
script: npm run build
# script: npm run test:services

View File

@ -1,8 +1,13 @@
import { Projects } from '../../src';
const credentials = {
url: process.env.GITLAB_URL,
token: process.env.PERSONAL_ACCESS_TOKEN
}
describe('Projects.all', () => {
it('should return empty array', async () => {
const service = new Projects({ url: process.env.GITLAB_URL, token: process.env.API_TOKEN });
const service = new Projects(credentials);
const projects = await service.all();
expect(projects).toEqual([]);