-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
46 lines (37 loc) · 1.12 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
language: php
sudo: enabled
services:
- mysql
git:
depth: 3
php:
- 7.2
env:
global:
- HUMHUB_PATH=/opt/humhub
cache:
directories:
- $HOME/.composer/cache
install:
- .travis/install-dependencies.sh
- .travis/setup-humhub.sh
before_script:
- $HOME/chromedriver --url-base=/wd/hub &
- php --server 127.0.0.1:8080 --docroot ${HUMHUB_PATH} &>/dev/null &
- sleep 5
- curl --fail --head http://127.0.0.1:8080/index-test.php
script:
- cd tests
- ln -s ${HUMHUB_PATH}/protected/humhub/tests/config/env config/ # create symlink from /opt/humhub to config/
- sed -i -e "s|../../../humhub/tests/config/env|config/env|g" codeception.yml # fix relative path for codeception
- php ${HUMHUB_PATH}/protected/vendor/bin/codecept build
- php ${HUMHUB_PATH}/protected/vendor/bin/codecept run --env travis
after_failure:
- cd ..
- .travis/upload-failure.sh
after_success:
- test $TRAVIS_BRANCH = "master" &&
test $TRAVIS_PULL_REQUEST = "false" &&
php ${HUMHUB_PATH}/protected/vendor/bin/codecept run --coverage-xml --env travis &&
cd .. &&
php ${HUMHUB_PATH}/protected/vendor/bin/php-coveralls -v