forked from pkp/ops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (89 loc) · 3.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
env:
global:
# Used for saving generated test datasets. See Notion for details.
- secure: bP5CEyBsybJUx+iBxZ4XKoMPHd2iMdYVhTNNcVSSPUvLLjmLYVDkbH7b4tD9vN+3i/5pCs+m3sfq0iuQHsP8l7D4VsouB+3jt81gw59o8bpVuTpse0jmagoxsw3TvU3Mu/felE3loBz+BbRkpDCnTZHYn0fAd95Xk3es1iex0zs+fmk4ClYg2yzrtVRw972j0/wMWWXs+Phw2dhB9Mx5fHtm9zV6RoMndBWiq3vwdqGTOoBLoILJ0mQbkMA1SuILPQDN2DtCsBIFTRoH9DI+KUyTzPcvrTUZoMTpVa/09Vpb2cZAhzH9S0++bGs1Ib9m8rrnUyaQk/iJRYxEj9DcCvYpO7TypS13E69CfggCdI5EE5TKs1LBr8wkGMp8ajzh3qMEotF+9QMJkeyqqX5roV/kzB5HV2yqzJSD8aAdHxDw4VYfj312884DDanQh/RXeF8sg5+k8KBx6vjZOhONk5/pzvSR1FTS63+KCI1XHP/kWiDpHg215KekmUQg+SxZUFMqZN+8SL609F+TZqQt5s2uK2Gr/hSCUWY/KmeiLc83PGSSYw59E34CcADBysbJ0lueiPzDybOIAB1hcKHIF5pIANzPCocLmK0axGbp90fN85tcgDCY5axEwJ7s8Uw+h4kTi1HhPfap19I/9EMVrpML+vB+kTSNLFuMVV7keP4=
- APPLICATION=ops
# Attempt to work around Travis certificate failure problem
dist: bionic
# Configure the build matrix
matrix:
include:
# Validation
- env: TEST=validation
php: 7.4
# PostgreSQL / various PHP
- env: TEST=pgsql
php: 7.4
- env:
- TEST: pgsql
- SAVE_BUILD: true
php: 8.0
# MySQL / various PHP
- env: TEST=mysql
php: 7.4
- env:
- TEST: mysql
- SAVE_BUILD: true
php: 8.0
# Path info disabled DISABLED pending a fix of pkp/pkp-lib#4414
# - env: TEST=mysql DISABLE_PATH_INFO=1
# php: 7.2
language: php
python:
- 3.3 # Required by Javascript linter/builder
git:
# Inhibit automatic submodule checkout (see below)
submodules: false
cache:
npm: true
directories:
- $HOME/.composer/cache
addons:
chrome: beta
postgresql: "9.5"
apt:
update: true
before_install:
# Check out submodules (this script checks out developer forks if necessary)
- ./tools/startSubmodulesTRAVIS.sh
# Update to latest stable version of npm
- npm i g -npm
- |
if [[ "$TEST" != "validation" ]]; then
# Prepare for unit and integration tests.
# Prepare the server environment
./lib/pkp/tools/travis/prepare-webserver.sh
source ./lib/pkp/tools/travis/start-xvfb.sh
./lib/pkp/tools/travis/start-selenium.sh
# Prepare the local codebase
./lib/pkp/tools/travis/install-composer-dependencies.sh
npm install && npm run build
else
# Prepare for validation tests.
npm install
./lib/pkp/tools/travis/install-linter.sh
fi
script:
- |
if [[ "$TEST" != "validation" ]]; then
# Run the unit and integration tests.
source ./lib/pkp/tools/travis/prepare-tests.sh
./lib/pkp/tools/travis/run-tests.sh
else
# Run the validation tests.
./lib/pkp/tools/travis/validate-xml.sh
./lib/pkp/tools/buildjs.sh -n
./lib/pkp/tools/checkHelp.sh
./lib/pkp/tools/travis/validate-json.sh
npm run lint
fi
after_script:
# 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.
- tail -n 200 error.log
- cat ./lib/pkp/tests/results/error.log
after_failure:
- sudo apt-get install sharutils
- tar cz cypress/screenshots | uuencode /dev/stdout
- cat error.log