Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.04 KB | None | 0 0
  1. image: node:6
  2.  
  3. stages:
  4.  - build
  5.   - test
  6.  
  7. services:
  8.  - postgres:latest
  9.   - mysql:latest
  10.  
  11. variables:
  12.   POSTGRES_USER: 'bran'
  13.   POSTGRES_DB: 'bran'
  14.   MYSQL_DATABASE: 'whmcs'
  15.   MYSQL_USER: 'whmcs'
  16.   MYSQL_PASSWORD: '123456'
  17.   MYSQL_ROOT_PASSWORD: '123456'
  18.  
  19. cache:
  20.   paths:
  21.  - node_modules/
  22.  
  23. before_script:
  24.  - apt-get update -y
  25.   - apt-get install -y postgresql-client mysql-client
  26.   - npm set registry https://npm.hostworks.ca
  27.  
  28. build:
  29.   stage: 'build'
  30.   script:
  31.    - npm install
  32.     - npm run lint
  33.     - npm run build
  34.   artifacts:
  35.     paths:
  36.      - node_modules/
  37.       - dist/
  38.  
  39. test:
  40.   stage: 'test'
  41.   script:
  42.   - psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -f ./docker/db/bran/db.sql
  43.    - psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -f ./docker/db/bran/seed.sql
  44.    - mysql -h mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < ./docker/db/helpdesk/db.sql
  45.    - mysql -h mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < ./docker/db/helpdesk/seed.sql
  46.    - ENVIRONMENT=testing npm run test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement