forked from GravityKit/GravityView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (52 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
language: php
sudo: false
dist: trusty
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- master
- develop
php:
- 7.3
- 7.2
- 7.1
- 7.0
- 5.6
- 5.4
- 5.3
- nightly
env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=nightly WP_MULTISITE=0
matrix:
include:
- php: 7.3
- php: 5.3
env: WP_VERSION=latest WP_MULTISITE=1
allow_failures:
- php: nightly
before_install:
- composer config github-oauth.github.com "$GITHUB_ACCESS_TOKEN"
install:
- curl -s https://getcomposer.org/installer | php
- php composer.phar install --no-interaction
before_script:
- echo -e "[server]\nmax_allowed_packet=16M\nwait_timeout=28800" | sudo tee -a /etc/mysql/conf.d/limits.cnf
- sudo service mysql restart
- mysql -e "SHOW VARIABLES LIKE 'max_allowed_packet';"
- mysql -e "SHOW VARIABLES LIKE 'wait_timeout';"
- bash tests/bin/install.sh gravityview_test root '' localhost $WP_VERSION
- bash tests/bin/travis.sh before
- mkdir -p /tmp/wordpress-tests-lib/data/themedir1
- if [[ $TRAVIS_PHP_VERSION = '7.2' && $WP_VERSION = 'latest' && $WP_MULTISITE = '0' ]]; then DO_COVERAGE=1; else DO_COVERAGE=0; fi
script:
- if [[ $DO_COVERAGE = '1' ]]; then vendor/bin/phpunit -c phpunit.xml.dist; else vendor/bin/phpunit -c phpunit.xml.dist --no-coverage; fi
after_script:
- if [[ $DO_COVERAGE = '1' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ $DO_COVERAGE = '1' ]]; then php ocular.phar code-coverage:upload --format=php-clover /tmp/clover.xml; fi
- cat /tmp/test.log
after_success:
- if [[ $DO_COVERAGE = '1' ]]; then travis_retry php vendor/bin/coveralls -v --exclude-no-stmt; fi