forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (61 loc) · 2.18 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
62
63
64
65
66
67
68
69
70
71
72
73
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
git:
depth: 1
services:
- postgresql
- mysql
env:
global:
- GRADLE_OPTS=-Dorg.gradle.daemon=false
matrix:
- TEST_SUITE=check OPTIONS=modernizer
- TEST_SUITE=checkstyle
- TEST_SUITE=fetcherTest
- TEST_SUITE=databaseTest
- TEST_SUITE=guiTest
- TEST_SUITE=codecov
- DEPENDENCY_UPDATES=check
matrix:
fast_finish: true
allow_failures:
- env: TEST_SUITE=fetcherTest
- env: TEST_SUITE=codecov
- env: DEPENDENCY_UPDATES=check
# 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:
# --scan enables the Gradle build scan, which can be used to investigate the time each action consumes
# For more information see https://gradle.com/scans/get-started
- if [ "$TEST_SUITE" != "guiTest" ] && [ "$TEST_SUITE" != "checkstyle" ] && [ "$TEST_SUITE" != "codecov" ]; then ./gradlew $TEST_SUITE $OPTIONS --scan; fi
- if [ "$TEST_SUITE" == "checkstyle" ]; then ./gradlew checkstyleMain checkstyleTest checkstyleJmh; fi
- if [ "$TEST_SUITE" == "guiTest" ]; then ./buildres/gui-tests.sh; fi
- if [ "$TEST_SUITE" == "codecov" ]; then ./gradlew jacocoTestReport; bash <(curl -s https://codecov.io/bash); fi
- if [ "$DEPENDENCY_UPDATES" == "check" ]; then ./gradlew -q checkOutdatedDependencies; fi
after_failure:
# show test results if build fails
- $TRAVIS_BUILD_DIR/scripts/after-failure.sh
branches:
only:
- master
- maintable-beta
# cache gradle dependencies
# https://docs.travis-ci.com/user/languages/java#Caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/