.travis.yml
language: node_js
dist: focal
services:
- docker
node_js:
- "16"
cache:
directories:
- "node_modules"
addons:
apt:
packages:
- rabbitmq-server
env:
global:
- CC_TEST_REPORTER_ID=b20424bf38e9d64206d37fc2633b573f696f7b7e423cee11d241ec12a2bf27cc
- NODE_ENV=test
- PORT=7400
- API_VERSION=v1
- LOCAL_URL=http://127.0.0.1:7400
- CT_URL=http://127.0.0.1:9000
- RABBITMQ_URL=amqp://0.0.0.0:5672
- HOST_IP=127.0.0.1
- NODE_TLS_REJECT_UNAUTHORIZED=0
- ELASTIC_URL=https://127.0.0.1:9200
- ELASTIC_TEST_URL=127.0.0.1:9200
- ELASTIC_USER=admin
- ELASTIC_PASSWORD=admin
before_script:
- docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" amazon/opendistro-for-elasticsearch:1.10.1
- 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