forked from FriendsOfSymfony/FOSHttpCache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
99 lines (82 loc) · 3.36 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
dist: trusty
language: php
cache:
directories:
- $HOME/.composer/cache/files
env:
global:
- VARNISH_VERSION=5.1
- SYMFONY_PHPUNIT_VERSION=8
- SYMFONY_DEPRECATIONS_HELPER="max[self]=0"
- DEPENDENCIES="toflar/psr6-symfony-http-cache-store:^2.2.0\|^3.0.0"
matrix:
fast_finish: true
include:
# Minimum supported versions
- php: 7.2
env: VARNISH_VERSION=3.0 SYMFONY_PHPUNIT_VERSION=5.7 COMPOSER_FLAGS="--prefer-lowest" DEPENDENCIES=""
- php: 7.2
- php: 7.3
- php: 7.4
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" VARNISH_MODULES_VERSION=0.12.1
#TODO re-add DOCCHECK=true - see https://github.com/FriendsOfSymfony/FOSHttpCache/pull/450
# PHP 8.0 (Travis does not yet support using the stable 8.0.0)
- php: nightly
dist: xenial
env: SYMFONY_PHPUNIT_VERSION=8
# Test with Varnish 4
- php: 7.4
env: VARNISH_VERSION=4.1 VARNISH_MODULES_VERSION=0.9.1
# Test PHPUnit versions
- php: 7.4
env: SYMFONY_PHPUNIT_VERSION=6
# Test SYMFONY LTS versions
- php: 7.4
env: DEPENDENCIES="symfony/lts:^3 toflar/psr6-symfony-http-cache-store:^2.2.0\|^3.0.0"
- php: 7.4
env: DEPENDENCIES="symfony/flex" SYMFONY_VERSION="^4"
# Latest commit to master
- php: 7.4
env: STABILITY="dev"
allow_failures:
# Dev-master is allowed to fail.
- env: STABILITY="dev"
branches:
only:
- master
# Build maintenance branches for older releases if needed. such branches should be named like "1.2"
- '/^\d+\.\d+$/'
before_install:
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; echo ${DEPENDENCIES}; fi;
- if ! [ -z "$SYMFONY_VERSION" ]; then composer config extra.symfony.require ${SYMFONY_VERSION}; fi;
install:
- composer update $COMPOSER_FLAGS --prefer-dist --no-interaction
before_script:
# Install Varnish
- |
set -e
curl -L https://packagecloud.io/varnishcache/varnish${VARNISH_VERSION//./}/gpgkey | sudo apt-key add -
curl -L "https://packagecloud.io/install/repositories/varnishcache/varnish${VARNISH_VERSION//./}/config_file.list?os=ubuntu&dist=trusty&source=script" | sudo tee -a /etc/apt/sources.list
cat /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -qq varnish
- if [ "$DOCCHECK" = true ]; then sudo apt-get install -qq python-sphinx enchant; fi
- if [ "$DOCCHECK" = true ]; then sudo pip install -r doc/requirements.txt; fi
- if [ "$VARNISH_MODULES_VERSION" != "" ]; then sh ./tests/install-varnish-modules.sh; fi
# Install NGINX
- sh ./tests/install-nginx.sh
script:
- composer validate --strict --no-check-lock
- vendor/bin/simple-phpunit $PHPUNIT_FLAGS
- if [[ "$DOCCHECK" = true ]]; then make -C doc SPHINXOPTS='-nW' html; fi
- if [[ "$DOCCHECK" = true ]]; then make -C doc spelling; fi
after_script:
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
after_failure:
- cat /tmp/fos_nginx_error.log
- cat /tmp/fos_nginx_access.log
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/apache2/access.log
- sudo cat /var/log/apache2/other_vhosts_access.log