MiniDigger/Hangar

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
dist: xenial
notifications:
  email: false

language: scala
jdk:
  - openjdk8

scala:
  - 2.12.8

services: postgresql

addons:
  postgresql: "11"
  apt:
    packages:
      - postgresql-11
      - postgresql-client-11


before_script:
  - psql -c "ALTER USER travis WITH PASSWORD 'travis';"
  - psql -c "CREATE EXTENSION pgcrypto;"
  - cp ore/conf/application.conf.template ore/conf/application.conf

env:
  global:
    - PGPORT=5433
    - DB_USERNAME=travis
    - DB_PASSWORD=travis
    - DB_DATABASE=travis

# Caching taken from https://www.scala-sbt.org/1.0/docs/Travis-CI-with-sbt.html#Caching
cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt
    - $HOME/.coursier/cache

before_cache:
  # Cleanup the cached directories to avoid unnecessary cache updates
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt        -name "*.lock"               -print -delete

script:
  - sbt ++$TRAVIS_SCALA_VERSION ore/test
  - ./scalafmt ore/app ore/test db/src build.sbt --test --non-interactive