os: linux language: java dist: bionic jobs: include: - dist: trusty # Fastest build first jdk: oraclejdk8 - jdk: openjdk13 - jdk: oraclejdk11 - os: osx osx_image: xcode11.6 # macOS 10.15.4, Oracle JDK 14.0.1 language: java services: # not supported on os x addons: homebrew: packages: - mysql - mariadb@10.3 before_script: - brew services start mysql - brew services start postgresql - brew services start mariadb@10.3 #- sleep 15 # wait for databases to start up # Homebrew postgres workaround - create expected user postgres - /usr/local/opt/postgres/bin/createuser -s postgres # FIXME this is duplicated from linux config, but don't know a better way to do it - mysql -u root -e 'CREATE DATABASE test_db;' - mysql -u root test_db < extensions/database/tests/conf/travis-mysql.sql - psql -c 'CREATE DATABASE test_db;' -U postgres - psql -U postgres test_db < extensions/database/tests/conf/travis-pgsql.sql - cp extensions/database/tests/conf/travis_tests.xml extensions/database/tests/conf/tests.xml - jdk: openjdk12 dist: xenial # just for a little variety # Jacoco doesn't work with Java 16 and this workaround doesn't work # - jdk: oraclejdk-ea # script: mvn test # after_success: mvn prepare-package -DskipTests=true # - jdk: openjdk-ea # script: mvn test # after_success: mvn prepare-package -DskipTests=true allow_failures: - jdk: openjdk-ea - jdk: oraclejdk-ea addons: mariadb: '10.3' services: - mysql - postgresql env: # encrypted Codacy key, see https://docs.travis-ci.com/user/encryption-keys/ - secure: "VmS4He99YlI6rdmw8Q25OZ9kUp11sRbt0W1QMBvA5lzNSmhN1Q1KtaMj9AGwpCZWcyGWri4AQxEmloARxACxQHXRmNE7ro2DESGw46RAocBAf+RfBxYTifIyUGu5TnSCQhz56SkgpyWpedZAZWyah9ZxgUMfet4KXFUfeiUgYQA=" before_install: # Fake out packaging for Travis builds before mvn install - cp packaging/travis_pom.xml packaging/pom.xml - mvn process-resources before_script: # create test databases for mysql, mariadb and postgresql - mysql -u root -e 'CREATE DATABASE test_db;' - mysql -u root test_db < extensions/database/tests/conf/travis-mysql.sql - psql -c 'CREATE DATABASE test_db;' -U postgres - psql -U postgres test_db < extensions/database/tests/conf/travis-pgsql.sql - cp extensions/database/tests/conf/travis_tests.xml extensions/database/tests/conf/tests.xml script: - mvn jacoco:prepare-agent test after_success: - mvn prepare-package -DskipTests=true - mvn jacoco:report coveralls:report cache: directories: - $HOME/.m2