RandomSec/.travis.yml

86 lines
3.1 KiB
YAML
Raw Normal View History

os: linux
2013-05-26 17:11:04 +02:00
language: java
dist: bionic
jobs:
include:
- dist: trusty # Fastest build first & for all builds
jdk: oraclejdk8 # Trusty default
# Full matrix only for merges to master or anything to do with release branches e.g. v3.5
- if: (branch = master AND type != pull_request) OR branch ~= /^v\d\.\d.*/
jdk: openjdk11 # Bionic default
- if: branch = master AND type != pull_request OR branch ~= /^v\d\.\d.*/
jdk: openjdk12
dist: xenial # just for a little variety
- if: branch = master AND type != pull_request OR branch ~= /^v\d\.\d.*/
jdk: openjdk13
- if: branch = master AND type != pull_request OR branch ~= /^v\d\.\d.*/
jdk: openjdk14 # replacement for OS X Java 14 build
- if: branch = master AND type != pull_request OR branch ~= /^v\d\.\d.*/
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
- if: branch = master AND type != pull_request OR branch ~= /^v\d\.\d.*/
jdk: oraclejdk-ea
- if: branch = master AND type != pull_request OR branch ~= /^v\d\.\d.*/
jdk: openjdk-ea
allow_failures:
- os: osx
- jdk: openjdk-ea
- jdk: oraclejdk-ea
2018-01-14 03:24:56 +01:00
addons:
2019-06-13 15:00:17 +02:00
mariadb: '10.3'
2018-01-14 03:24:56 +01:00
services:
2019-06-13 14:44:51 +02:00
- mysql
2018-01-14 03:24:56 +01:00
- postgresql
2017-08-03 12:20:21 +02:00
env:
# encrypted Codacy key, see https://docs.travis-ci.com/user/encryption-keys/
- secure: "VmS4He99YlI6rdmw8Q25OZ9kUp11sRbt0W1QMBvA5lzNSmhN1Q1KtaMj9AGwpCZWcyGWri4AQxEmloARxACxQHXRmNE7ro2DESGw46RAocBAf+RfBxYTifIyUGu5TnSCQhz56SkgpyWpedZAZWyah9ZxgUMfet4KXFUfeiUgYQA="
2013-05-26 17:16:14 +02:00
2017-08-03 12:20:21 +02:00
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
2019-06-13 14:51:03 +02:00
- mysql -u root -e 'CREATE DATABASE test_db;'
- mysql -u root test_db < extensions/database/tests/conf/travis-mysql.sql
2018-01-14 03:24:56 +01:00
- 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
2017-08-03 12:20:21 +02:00
2018-01-03 18:37:51 +01:00
script:
2019-05-15 15:00:36 +02:00
- mvn jacoco:prepare-agent test
2017-08-03 12:20:21 +02:00
after_success:
2018-09-16 21:35:55 +02:00
- mvn prepare-package -DskipTests=true
2019-05-15 14:54:53 +02:00
- mvn jacoco:report coveralls:report
2017-08-03 12:20:21 +02:00
cache:
directories:
- $HOME/.m2