forked from pkp/ojs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (53 loc) · 2.31 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
# Configure the build matrix
env:
matrix:
- TEST=validation
- TEST=pgsql
- TEST=mysql
global:
- secure: "nxosaZUBRaYhk8+LHaDnVgMIveiK4zewiXW5Fw5TtB/D6V67oASufil1uhcayyzIBwnrZZmrFPLhXm0Lm1RiQHrsftffcMB5JlWK9R9EyWpyd87ewqWy3kXBAvsXXTU6ihGiaFpklhVCKt7XcDSR8bWEb2NVWrM7JS7dHDKMwaA="
language: php
php:
- 5.3
- 5.6
- 7.1
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
- if [[ "$TEST" == "validation" ]]; then ./lib/pkp/tools/travis/validate-xml.sh && ./lib/pkp/tools/buildjs.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