forked from GravityPDF/gravity-pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (38 loc) · 1.58 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
language: php
sudo: false
addons:
apt:
sources:
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
packages:
- yarn
cache:
yarn: true
directories:
- $HOME/.composer/cache/files
php:
- 5.6
- 7.0
- 7.1
- 7.2
env:
- WP_VERSION=latest WP_MULTISITE=0
matrix:
include:
- php: 7.2
env: WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_COVERAGE_TEST=1
before_script:
- if [[ ! $PHPUNIT_COVERAGE_TEST ]]; then phpenv config-rm xdebug.ini; fi
- if find . -name "*.php" -exec php -l {} \; | grep "unexpected $end"; then exit 1; fi
- composer install --prefer-source --optimize-autoloader --no-scripts
- bash tests/bin/install.sh gravitypdf_test root '' localhost $WP_VERSION
- if [[ $WP_MULTISITE = 1 ]]; then nvm install 6.10 && yarn global add karma-cli && yarn; fi
script:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then yarn run test:coverage; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then ./vendor/bin/phpunit --coverage-clover=tmp/coverage/report-xml/php-coverage1.xml -c tests/phpunit/phpunit.xml.dist; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then ./vendor/bin/phpunit --coverage-clover=tmp/coverage/report-xml/php-coverage2.xml -c tests/phpunit/phpunit.xml.dist --group ajax; fi
- if [[ ! $PHPUNIT_COVERAGE_TEST ]]; then ./vendor/bin/phpunit -c tests/phpunit/phpunit.xml.dist; fi
- if [[ ! $PHPUNIT_COVERAGE_TEST ]]; then ./vendor/bin/phpunit -c tests/phpunit/phpunit.xml.dist --group ajax; fi
after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash); fi