-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
74 lines (68 loc) · 2.11 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
74
dist: trusty
matrix:
include:
- python: 2.7
env: PYTEST=1
- jdk: oraclejdk8
env: MVN=1
# - jdk: oraclejdk9
# env: MVN=1
# - jdk: oraclejdk10
# env: MVN=1
- jdk: oraclejdk8
env: PEP8=1
before_install:
- |
if ! [ -z "$PYTEST" ]; then
export JYTHON_URL='http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar'
wget $JYTHON_URL -O jython_installer.jar; java -jar jython_installer.jar -s -d $HOME/jython; export PATH=$HOME/jython/bin:$PATH
export JYTHONPATH=$HOME/build/$TRAVIS_REPO_SLUG/resources/lib:$JYTHONPATH
mkdir $HOME/.nammu
cp $HOME/build/$TRAVIS_REPO_SLUG/resources/config/*.yaml $HOME/.nammu
fi
install:
- |
if ! [ -z "$PYTEST" ]; then
# Install MarkupSafe separately to make sure the version we want is
# picked up
pip install --user MarkupSafe==1.1.1
pip install --user -r requirements.txt
mkdir $HOME/build/$TRAVIS_REPO_SLUG/resources/lib
javac -d $HOME/build/$TRAVIS_REPO_SLUG/resources/lib $HOME/build/$TRAVIS_REPO_SLUG/src/main/java/uk/ac/ucl/rc/development/oracc/ext/*.java
fi
- |
if ! [ -z "$PEP8" ]; then
pip install --user pep8
fi
before_script:
- |
if ! [ -z "$PYTEST" ]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3
fi
script:
- |
if ! [ -z "$PYTEST" ]; then
py.test python/nammu/test/
fi
- |
if ! [ -z "$PEP8" ]; then
python -m pep8 python/
fi
- |
if ! [ -z "$MVN" ]; then
mvn clean install -DskipTests
fi
deploy:
provider: releases
api_key:
# Note; this api_key is only valid for oracc/nammu; you need
# to make your own: https://docs.travis-ci.com/user/deployment/releases/
secure: SuiZtkTBUab5dGWE6hcJpzN2y7ZXWLf05YBDSPjxGd3CX6phcbM9HxMRj92PdDPIWCE7QXPWC9+gEl1bxJnObWZzgE59Vdz2gZJY4IsuSQ6fCf3jqbeOZ+KA2VPRS+6/9lgseJySMExARoFcpUKzrU+S5H0m1/JznxjwI1ItAjw=
file_glob: true
file: $HOME/.m2/repository/uk/ac/ucl/rc/development/oracc/nammu/**/nammu*.jar
skip_cleanup: true
on:
repo: oracc/nammu
tags: true