forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (50 loc) · 1.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
language: java
# we test at Ubuntu Trusty (Ubuntu 14.04 LTS)
# see https://docs.travis-ci.com/user/trusty-ci-environment/
# This environment is continuously updated as described in https://docs.travis-ci.com/user/build-environment-updates/
dist: trusty
sudo: required
services:
- postgresql
- mysql
env:
global:
- GRADLE_OPTS=-Dorg.gradle.daemon=false
matrix:
- TEST_SUITE=check OPTIONS=modernizer
- TEST_SUITE=fetcherTest
- TEST_SUITE=databaseTest
- TEST_SUITE=guiTest
matrix:
fast_finish: true
allow_failures:
- env: TEST_SUITE=fetcherTest
# JavaFX localization tests need a running X environment
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
install: true
before_script:
- psql -c 'create database jabref;' -U postgres
- mysql -u root -e 'create database jabref'
script:
# -Dscan enables the Gradle build scan, which can be used to investiage the time each action consumes
# For more information see https://gradle.com/scans/get-started
- if [ "$TEST_SUITE" != "guiTest" ]; then ./gradlew $TEST_SUITE $OPTIONS -Dscan; fi
- if [ "$TEST_SUITE" == "guiTest" ]; then ./buildres/gui-tests.sh; fi
after_success:
# enable codecov report
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash)
after_failure:
# show test results if build fails
- $TRAVIS_BUILD_DIR/scripts/after-failure.sh
# cache gradle dependencies
# https://docs.travis-ci.com/user/languages/java#Caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/