language: node_js

node_js:
  - node
  - lts/erbium
  - lts/dubnium

services:
  - postgresql

branches:
  only:
    - master

env: >
  NODE_ENV=test
  APP_NAME='Express API ES6 Starter'
  APP_VERSION='1.0.0'
  TEST_APP_PORT='9945'
  TEST_DB_NAME='express_test'
  TEST_DB_PASSWORD=''
  TEST_DB_PORT='5432'
  TEST_DB_USER='postgres'

before_script:
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH="$HOME/.yarn/bin:$PATH"
  - cp .env.example .env
  - psql -c 'create database express_test;' -U postgres
  - yarn migrate

script:
  - yarn test:coverage

after_script:
  - yarn codecov

language: node_js

node_js:
  - node
  - lts/erbium
  - lts/dubnium

services:
  - postgresql

branches:
  only:
    - master

env: >
  NODE_ENV=test
  APP_NAME='Express API ES6 Starter'
  APP_VERSION='1.0.0'
  TEST_APP_PORT='9945'
  TEST_DB_NAME='express_test'
  TEST_DB_PASSWORD=''
  TEST_DB_PORT='5432'
  TEST_DB_USER='postgres'

before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH="$HOME/.yarn/bin:$PATH"

before_script:
  - cp .env.example .env
  - psql -c 'create database express_test;' -U postgres
  - yarn migrate

script:
  - yarn test:coverage

after_script:
  - yarn codecov

Upgrade yarn before running the tests
Upgrade yarn before running the tests
