.travis.yml
language: node_js
services:
- mongodb
node_js:
- "12"
cache:
directories:
- "node_modules"
env:
global:
- CC_TEST_REPORTER_ID=544ca3cabbabe25f87c4a8cf50edb252962068bd555793a5e4258184d8e7d1b8
- PORT=4400
- NODE_ENV=test
- CT_URL=http://127.0.0.1:9000
- API_VERSION=v1
- CT_REGISTER_MODE=auto
- LOCAL_URL=http://127.0.0.1:4400
- CT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Im1pY3Jvc2VydmljZSIsImNyZWF0ZWRBdCI6IjIwMTYtMDktMTQifQ.IRCIRm1nfIQTfda_Wb6Pg-341zhV8soAgzw7dd5HxxQ
- MONGO_PORT_27017_TCP_ADDR=127.0.0.1
- MONGO_PORT_27017_TCP_DATABASE=gfw_subscription_db_test
- TARGET_SHEET_ID=TARGET_SHEET_ID
- FASTLY_ENABLED=false
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- yarn test
- yarn run coverage
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT