-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (42 loc) · 1.67 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
# Configure the build matrix
env:
- TEST=validation
- TEST=pgsql
- TEST=mysql
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
# Configure the webserver
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/prepare-webserver.sh; fi
# Install phpunit
- if [[ "$TEST" != "validation" ]]; then ./lib/pkp/tools/travis/install-phpunit.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
# 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
- if [[ "$TEST" == "validation" ]]; then ./lib/pkp/tools/travis/validate-xml.sh; ./lib/pkp/tools/buildjs.sh; fi
after_script:
# 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