forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (63 loc) · 2.23 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/
sudo: required
dist: trusty
# update to latest Java8 as described at https://github.com/travis-ci/travis-ci/issues/4042#issuecomment-109756980
addons:
apt:
packages:
# most recent Java8 - this makes the DK switcher obsolete - see https://github.com/travis-ci/travis-ci/issues/5897#issuecomment-218354129
- oracle-java8-installer
# MySQL 5.6 as desccribed at https://docs.travis-ci.com/user/database-setup/#MySQL-5.6
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
services:
- postgresql
- mysql
env:
- GRADLE_OPTS=-Dorg.gradle.daemon=false
# skip installation as this is also done during the script step
install: true
before_script:
- psql -c 'create database jabref;' -U postgres
- mysql -u root -e 'create database jabref'
script:
- ./gradlew check
- ./gradlew databaseTest
# Prepare integration tests
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
# no need for databases for the integrationTest -> save memory
- sudo service mysql stop
- sudo service postgresql stop
# following services identified by "sudo service --status-all" do not need to run, too
# excluded: rsyslog (feels wrong), udev (feels wrong), friendly-recovery ("Unkonwn instance" error)
- sudo service acpid stop
- sudo service atd stop
- sudo service cron stop
- sudo service memcached stop
- sudo service ntp stop
- sudo service rabbitmq-server stop
- sudo service resolvconf stop
- sudo service sshguard stop
- sudo service ssh stop
# Integratation tests run in a timeout. Just start them and kill them after 60s
- timeout 60 ./gradlew integrationTest --info || true
after_script:
# 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/