sudo: false
dist: trusty
language: java
jdk:
  - oraclejdk8
#  - oraclejdk11
script: mvn cobertura:cobertura -DskipTests=false

services:
  - mysql
  - redis

#branches:
#  only:
#    - master
git:
  submodules: false

before_script:
  - mysql -e "CREATE DATABASE rebuild30 COLLATE utf8mb4_general_ci;"
  - mysql -e "CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; GRANT ALL PRIVILEGES ON rebuild30.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES;"
  - mysql -D rebuild30 < src/main/resources/scripts/db-init.sql

# codecov
after_success:
  - bash <(curl -s https://codecov.io/bash)
