forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (61 loc) · 2.32 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
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
# skip installation as this is also done during the script step
install: true
# allow gui testing on travis
before_script:
- psql -c 'create database jabref;' -U postgres
script:
- ./gradlew check
# Integration tests currently often fail with "Process 'Gradle Test Executor 1' finished with non-zero exit value 137"
# They should run, but the result is ignored
- "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
- ./gradlew integrationTest --info || true
after_script:
# enable codecov report
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash)
# 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/
# enable slack notifications
notifications:
slack:
secure: B5LGefXS1Jt+d7tUzzmakoz+/ZnFUzmmmYuBXaikTUPDuxXacIrVTv4Vx+tcagxDrPQ3A20oi3+0t6p8xagytjLI9u3abACyWwO3+CbywuJDLBzxADVhg/+mKssfTmemRlZoBUrBlHZVk69LIJvqXFR5l5zAiBtDL1dWPeMEEvI=