dist: trusty
sudo: false
language: java
jdk:
- oraclejdk8
addons:
  postgresql: "9.5"
  apt:
    packages:
      # python for map file splitter
      - python3
      - python3-yaml
install: ./.travis/setup_lobby_database
before_script: ./.travis/setup_gpg
script: ./gradlew check jacocoTestReport -x validateYamls
after_success:
- ./.travis/update_checkstyle_thresholds
- bash <(curl -s https://codecov.io/bash)  # upload coverage report - https://github.com/codecov/example-gradle
before_deploy:
- ./.travis/install_install4j
- ENGINE_VERSION="$(grep engine_version game_engine.properties | sed 's/.*= *//g').$TRAVIS_BUILD_NUMBER"
- ./gradlew -PengineVersion="$ENGINE_VERSION" release
- ./.travis/generate_artifact_checksums
- ./.travis/push_tag $ENGINE_VERSION
- ./.travis/push_maps
deploy:
  provider: releases
  api_key:
    secure: nxaqYrkXLGL3W20/eCnf63DLjMrQAhEuW44jggh1/nI383goa+u6w0bBtWCxRdVzos7t4dpVfS6+kv6oIHacm9zVA+RYrqy5opzCJhq8lmXVVRijbALzUeiFif2HURMaKWj0ynRNVlAyBHzazPTLZVWywifpdSubSkuMWkl20cmuKu/Hg3c1EC9se3OYhhTHx3Hya7xSrctrDEYLsEBAUZzkKfscqRVqwwltS88CgIMtRISDpSBGrtH0t1uAH6NitTSguGgb+QEpqnELcRLymX2G1yzMA4Xr5c/L34MfbBKf8vIuG9t411xYuLoyKoUbroTWxSnPwlSy6PHz+QJ7UCXbDkATOGO3chxlKxglppvI/G3n2YP5Zf2dAaDlHblpvarh55i/4i4sKB2AbvvzkIHrQJwUgmLCbpN8/Vp9GWcGkd6i5U7F8tNInCs6ttX3oGvGOfYEXs02Ctyiea4LAqk4S7GZTuV2QXqxXglL4eRIwZ4UETiwgoAAtHma63Eq7+9t2ykMlk7zAK96FGwJrB97wa08aPuSxL94IYEBmn9Ht/vKXRiNQMvpnfp4rWQtL3cqbVyYAg5EjKb4PsBmnb91+RXtnWFOY1RpZGt8sPXYd+KZYzN1BXTFJEpaLLsIDN6r7nMcAvJDUmucaM+m7giPXz1ZBGAic3UBM1qMCgI=
  file_glob: true
  file: build/artifacts/*
  skip_cleanup: true
  prerelease: true
  on:
    tags: false
    repo: triplea-game/triplea
    branches:
      only:
        - master
