-
Notifications
You must be signed in to change notification settings - Fork 308
/
.travis.yml
72 lines (59 loc) · 1.86 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
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php
# The platforms you wants to test on
dist: xenial
os:
- linux
services:
- mysql
# list any PHP version you want to test against
php:
- 7.3
# optionally specify a list of environments, for example to test different RDBMS
env:
global:
- TEST_ENV='codeception'
- CI_PLATFORM='travis_ci'
- ABSOLUTE_URL='http://127.0.0.1:8888'
- DB_HOST='127.0.0.1'
- DB_NAME='gibbon_test'
- DB_USERNAME='root'
- DB_PASSWORD=''
# set git depth to reduce download size
git:
depth: 2
# enable php extensions
addons:
apt:
packages:
- gettext
# faster builds on new travis setup not using sudo
sudo: false
# Cache folder, you can delete cache from Travis CI web interface
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
# Disable x-debug to speed up things
- phpenv config-rm xdebug.ini
- export TZ=Etc/UTC
# add composer global bin to PATH to make codeception usable
- export PATH=$HOME/.composer/vendor/bin:$PATH
# Install packages those will be required during build
install:
- travis_retry composer self-update
- travis_retry composer global require "phpunit/phpunit:6.5.14"
- travis_retry composer global require "codeception/codeception:^3.0.0"
- travis_retry composer install --prefer-dist --no-interaction
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
- echo 'date.timezone = "Etc/UTC"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- php -S 127.0.0.1:8888 -t $TRAVIS_BUILD_DIR >/dev/null 2>&1 &
- sleep 1
# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
script:
- composer test
after_failure:
- cat /home/travis/build/GibbonEdu/core/tests/log/*.travis_ci.fail.html