This repository was archived by the owner on Nov 30, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (50 loc) · 1.65 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
dist: trusty
# Wait until travis bug fixes
sudo: require
branches:
only:
- master
- /^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/
services:
- mysql
## Cache composer
cache:
directories:
- $HOME/.composer/cache/files
notifications:
email:
on_success: never
on_failure: change
php:
- 7.0
- 7.1
- nightly
env:
global:
- COMPOSER_NO_INTERACTION=1
matrix:
- COMPOSER_DEPENDENCIES="highest"
- COMPOSER_DEPENDENCIES=""
matrix:
allow_failures:
- php: nightly
fast_finish: true
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && "$COMPOSER_DEPENDENCIES" == "" ]]; then WITH_COVERAGE=true; fi
# Disable xDebug to speed up the build unless test coverage is needed
- if [[ "$WITH_COVERAGE" != "true" && $(phpenv version-name) != "nightly" ]]; then phpenv config-rm xdebug.ini; fi
# Install helper scripts
- travis_retry composer global require --prefer-dist typisttech/travis-nginx-wordpress
- export PATH=$HOME/.composer/vendor/bin:$PATH
- travis_retry tnw-install-wordpress
- travis_retry tnw-prepare-codeception
- if [[ "$COMPOSER_DEPENDENCIES" == "highest" ]]; then travis_retry composer update --prefer-dist; fi
- if [[ "$COMPOSER_DEPENDENCIES" == "" ]]; then travis_retry composer install --prefer-dist; fi
script:
- if [[ "$WITH_COVERAGE" != "true" ]]; then composer test; fi
- if [[ "$WITH_COVERAGE" == "true" ]]; then composer test-with-coverage; fi
after_script:
# Upload coverage report
- if [[ "$WITH_COVERAGE" == "true" ]]; then travis_retry tnw-upload-coverage-to-scrutinizer; fi
- if [[ "$WITH_COVERAGE" == "true" ]]; then travis_retry tnw-upload-coverage-to-codecov; fi