forked from validator/validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (43 loc) · 1.71 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
sudo: required # we need sudo for testing the war file
addons:
apt:
packages:
- tomcat7
language: java
jdk:
- oraclejdk8
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/0b2024df5e6f10f19952
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
install:
# Install Python 2.7.12 as Python 2.7.9 includes significant changes of ssl
# https://www.python.org/downloads/release/python-279/
- curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
- export PATH="~/.pyenv/bin:$PATH"
- eval "$(pyenv init -)"
- eval "$(pyenv virtualenv-init -)"
- pyenv install 2.7.12
- pyenv global 2.7.12
- python --version
script:
- python ./build/build.py dldeps
- python ./build/build.py build
- python ./build/build.py check
- python ./build/build.py test
- echo "test" | python ./build/build.py jar
- java -jar ./build/dist/vnu.jar ./build/dist/index.html
- java -jar ./build/dist/vnu.jar ./site/nu-about.html
- jar xf ./build/dist/vnu.jar && file nu/validator/client/SimpleCommandLineValidator.class
| grep "version 52.0"
- echo "test" | python ./build/build.py war
- jar xf ./build/dist/vnu.war && file WEB-INF/classes/nu/validator/servlet/VerifierServlet.class
| grep "version 52.0"
- sudo cp ./build/dist/vnu.war /var/lib/tomcat7/webapps
- sleep 15
- curl -sS 'http://localhost:8080/vnu/?out=gnu&doc=data:text/html;charset=utf-8,%3C%21doctype%20html%3E%3Cmeta%20charset%3Dutf-8%3E%3Ctitle%3ETest%3C%2Ftitle%3E' > RESULTS
- test -z "$(if [ -t RESULTS ]; then cat RESULTS | grep -v '^$'; fi)"
- if [ $? != 0 ]; then cat RESULTS; fi