gfw-api/gfw-user-api

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
dist: focal
language: node_js
addons:
  apt:
    sources:
      - sourceline: 'deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse'
    packages:
      - mongodb-org
node_js:
  - "20.4"
cache:
  directories:
    - "node_modules"
env:
  global:
    - CC_TEST_REPORTER_ID=fabf1b450b3b2e0da71d8c52ecc2181b3217e31d23404113915aa9a3f0294f46
    - NODE_ENV=test
    - PORT=5037
    - GATEWAY_URL=http://127.0.0.1:9000
    - MONGO_PORT_27017_TCP_ADDR=127.0.0.1
    - MICROSERVICE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Im1pY3Jvc2VydmljZSIsImNyZWF0ZWRBdCI6IjIwMTYtMDktMTQifQ.IRCIRm1nfIQTfda_Wb6Pg-341zhV8soAgzw7dd5HxxQ
    - FASTLY_ENABLED=false
    - ALLOW_CONFIG_MUTATIONS=true
before_install:
  - sudo systemctl restart mongod.service
  - sleep 10
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