resource-watch/document-adapter

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: node_js
dist: focal
services:
  - docker
node_js:
  - "20.4"
cache:
  directories:
  - "node_modules"
addons:
  apt:
    packages:
    - rabbitmq-server
env:
  global:
    - CC_TEST_REPORTER_ID=835a699d552ad985ccca27cb5796bfbd750042d118498f3bc615e4d19f724a27
    - NODE_ENV=test
    - PORT=3001
    - GATEWAY_URL=http://127.0.0.1:9000
    - MONGO_PORT_27017_TCP_ADDR=127.0.0.1
    - MICROSERVICE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Im1pY3Jvc2VydmljZSIsImNyZWF0ZWRBdCI6IjIwMTYtMDktMTQifQ.IRCIRm1nfIQTfda_Wb6Pg-341zhV8soAgzw7dd5HxxQ
    - HOST_IP=127.0.0.1
    - RABBITMQ_URL=amqp://0.0.0.0:5672
    - 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
    - FASTLY_ENABLED=false
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