-
Notifications
You must be signed in to change notification settings - Fork 221
/
Copy path.travis.yml
65 lines (65 loc) · 3.95 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
dist: xenial
sudo: required
language: java
jdk:
- openjdk11
node_js:
- node
env:
global:
# See https://docs.google.com/document/d/1MqG8OW2kLGeedzbu6vb9D00tHljVabPA2tYwh3DB9UE/edit
- secure: duj2NzncZG+oNk8ISitO697mne1EzAajvdRjw39yevKTMdMbf6cbMa+beo/3JW8xMbGxMLovfI4zK0Bykoo98VQVJan87tLGTQVmOKGboi0sYvOeun9jXUoT66tQAEtlL48S5nNoHKyF/dRaGgPRPMkfXiPdElAU9FDklm3rwQs=
- secure: gWPaj/3IUfFU/MGqcB6AkD3MsAlLT9uBP5YZhgCZrgHXYIvyhEH9F+it17b5ibWq+i7boSs9G8HcCRwNdaNrlcN1ONDOVRW1f3syK2+HC947/FfzHE6jnamVbEAZMYr77WgR5eeqLQRl94Q2CRa3eW/6QERM99kt5nbRo3oPT/c=
- secure: X+82NUnipRkzqBAt4IOgVuW/kDd/m85MEExAxRAxqZ2R6ALCHRMYKpCSv47dW7qnX89EkkN8vEDQ1/5h8bnGY5i1a6b8mMVLS3tkRUtuqW9bL59TzEyVTS6hsWoNNKWL4rzqnDAXTyy4RB881ZGdkTR3nRjrmEZtbfVWLXQCQ+A=
- secure: Ufv45EFdy9eKEjZ6Za7DAo7X/cAB16G8a9qNj+qvcCOBiZLTjXO8+1Hqj85R5dopZwYvHt0cVaIiPJ+/7z1DeQ9076g5UTdhnK+agPxMW7WPlf9QqXiIDMZbjBsmPEIjp4jF42QDjoxY/tPTsupW45yXkHCeroUAud2zwvDkb1c=
- secure: aUeNCaFFahWf6pQGhp4PbkQu20W1trf6lvSaydNV/ktdsPCkqr3nhJoN0M0CpKM9tqIb2ELj5/E4uKgSylbS2vdhVD0ysue6QvcexpRsuD8cpzYHjSDJyNP2z534nyQzKCkYpBn04r9asN/Uh4xV90Ctz1FZNzzqV6BdRK6N4Vc=
matrix:
- TARGET=orbeon-dist
- TARGET=test-unit
- TARGET=test-db DB=mysql
- TARGET=test-db DB=postgresql
- TARGET=test-db DB=sqlite
addons:
postgresql: "9.5"
artifacts:
paths:
- $(ls build/distrib/* | egrep -v '(embedding|proxy-portlet|xforms-filter|orbeon-auth)' | egrep -v '\-[CP]E\.(tgz|war)' | tr "\n" ":")
cache:
directories:
- "$HOME/.ivy2/cache"
- "$HOME/.m2/repository"
- "$HOME/.sbt/boot"
- "$HOME/.sbt/launchers"
- "$HOME/node_modules"
before_cache:
# Tricks to avoid unnecessary cache updates
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete
- find $HOME/.sbt -name "*.lock" -delete
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get -y install docker-ce
- sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/3.0.0-M0/2.13-3.0.0-M0) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm'
install:
# From https://docs.travis-ci.com/user/languages/java/: "Because there is no single standard way of installing project dependencies with Ant, you need to
# specify the exact command to run using install". Here we install npm dependencies for Node.js as we need them for integration tests.
- npm install
# update this only when sbt-the-bash-script needs to be updated
- |
export SBT_LAUNCHER=1.4.9
export SBT_OPTS="-Dfile.encoding=UTF-8"
curl -L --silent "https://github.com/sbt/sbt/releases/download/v$SBT_LAUNCHER/sbt-$SBT_LAUNCHER.tgz" > $HOME/sbt.tgz
tar zxf $HOME/sbt.tgz -C $HOME
sudo rm /usr/local/bin/sbt
sudo ln -s $HOME/sbt/bin/sbt /usr/local/bin/sbt
before_script:
- sudo /etc/init.d/mysql stop # We use MySQL through Docker, so avoid conflict with port 3306
- if [ "$TARGET" == "test-unit" ]; then docker pull tomcat:8.5-jdk8-openjdk-slim; fi
- if [ "$TARGET" == "test-db" ]; then echo $DOCKER_PASSWORD | docker login -u orbeon --password-stdin; fi
- if [ "$TARGET" == "test-db" ] && [ "$DB" == "mysql" ]; then docker run -d --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql:5.7 --sql-mode=ALLOW_INVALID_DATES --character-set-server=utf8mb4 --collation-server=utf8mb4_bin; fi
- if [ "$TARGET" == "test-db" ] && [ "$DB" == "postgresql" ]; then createuser --superuser orbeon; fi
- if [ "$TARGET" == "test-db" ] && [ "$DB" == "postgresql" ]; then createdb --owner=orbeon orbeon; fi
script:
- if [ "$TARGET" == "orbeon-dist" ]; then ant orbeon-dist ; fi
- if [ "$TARGET" == "test-unit" ]; then sbt test:compile ; sbt test:test ; fi
- if [ "$TARGET" == "test-db" ]; then sbt test:compile ; sbt db:test ; fi