.travis.yml
language: node_js
node_js:
- "stable"
cache:
directories:
- node_modules
services:
- docker
notifications:
env:
global:
- CC_TEST_REPORTER_ID=89f438a803a265aba44550a6485bcee827739763792822868bee15b592794dbb
- DOCKER_COMPOSE_VERSION=1.25.5
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
before_script:
- bash codeclimate.sh
- ./cc-test-reporter before-build
script:
- docker-compose up --build -d dev
- docker-compose start dev
- docker-compose exec dev /bin/bash -c "bash codeclimate.sh"
- docker-compose exec dev /bin/bash -c "npm run test -- --coverage --watchAll=false"
- docker-compose exec dev /bin/bash -c "cat coverage/lcov.info"
- docker ps -a
after_success:
- npm install
- npm run test -- --coverage --watchAll=false
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- docker-compose exec dev /bin/bash -c "./cc-test-reporter after-build -r 89f438a803a265aba44550a6485bcee827739763792822868bee15b592794dbb --exit-code $TRAVIS_TEST_RESULT"