Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image: node:6
- stages:
- - build
- - test
- services:
- - postgres:latest
- - mysql:latest
- variables:
- POSTGRES_USER: 'bran'
- POSTGRES_DB: 'bran'
- MYSQL_DATABASE: 'whmcs'
- MYSQL_USER: 'whmcs'
- MYSQL_PASSWORD: '123456'
- MYSQL_ROOT_PASSWORD: '123456'
- cache:
- paths:
- - node_modules/
- before_script:
- - apt-get update -y
- - apt-get install -y postgresql-client mysql-client
- - npm set registry https://npm.hostworks.ca
- build:
- stage: 'build'
- script:
- - npm install
- - npm run lint
- - npm run build
- artifacts:
- paths:
- - node_modules/
- - dist/
- test:
- stage: 'test'
- script:
- - psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -f ./docker/db/bran/db.sql
- - psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -f ./docker/db/bran/seed.sql
- - mysql -h mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < ./docker/db/helpdesk/db.sql
- - mysql -h mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < ./docker/db/helpdesk/seed.sql
- - ENVIRONMENT=testing npm run test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement