-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (52 loc) · 2.4 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
# Configure the build matrix
env:
matrix:
- TEST=validation
- TEST=pgsql
- TEST=mysql
global:
- secure: "PZbLl4MOmgQxp+fDQcitjiFVaBwERHvYbm+6sn71amkwTW87I6mlwXCtWReFGXgdQYQXiu79w28iVPvLbowbJi2Mb5bYt5kadve9Lf86uQfZq2KFYIFrUBAR9ACK2jhPNQWVZRh73+Jd5qaBzR3pgOFdFiBmasReT0+NpI3JLLk="
language: php
php:
- 5.3
python:
- 3.3
addons:
postgresql: "9.1"
git:
# We have to init submodules ourselves to make it recursive
submodules: false
before_install:
# Start submodules
- ./tools/startSubmodulesTRAVIS.sh
# Install composer dependencies
- cd lib/pkp && composer update && cd ../..
# Configure the webserver
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/prepare-webserver.sh; fi
# Start xvfb
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/start-xvfb.sh; fi
# Start Selenium
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/start-selenium.sh; fi
# Prepare code coverage
- if [[ "$TEST" == "mysql" ]]; then ./lib/pkp/tools/travis/prepare-code-coverage.sh; fi
# Install the JS linter
- if [[ "$TEST" == "validation" ]]; then ./lib/pkp/tools/travis/install-linter.sh; fi
# Sleep and output our logs, to avoid hanging build with no access to
# logs. This is useful for debugging but too verbose to leave enabled.
# - (sleep 590; cat access.log; cat error.log; cat xvfb-output; cat selenium-output; cat ./lib/pkp/tests/results/error.log) &
script:
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/run-tests.sh; fi
# ./lib/tools/buildjs.sh not included in latter command pending stats porting
- if [[ "$TEST" == "validation" ]]; then ./lib/pkp/tools/travis/validate-xml.sh && ./lib/pkp/tools/buildjs.sh && ./lib/pkp/tools/checkHelp.sh; fi
after_script:
# Merge the coverage reports into one HTML report and upload to http://pkp.sfu.ca/test-coverage
- if [[ "$TEST" == "mysql" ]]; then ./lib/pkp/tools/travis/post-code-coverage.sh; fi
# Upload the completed database to the PKP server for other uses
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/post-data-build.sh; fi
# Print logs and outputs for debugging.
# - cat access.log
- cat error.log
# - cat xvfb-output
# - cat selenium-output
- cat ./lib/pkp/tests/results/error.log
- for f in lib/pkp/tests/results/*.png; do echo ============== START ${f} ================== ; cat $f | base64 ; echo ============== END ${f} ================== ; done