Skip to content

Commit da181fc

Browse files
committed
debug test failures
1 parent d33973b commit da181fc

File tree

1 file changed

+4
-107
lines changed

1 file changed

+4
-107
lines changed

.travis.yml

Lines changed: 4 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ matrix:
2323
include:
2424
- php: 7.2
2525
env: php_extra="7.3 8.0"
26-
- php: 7.4
27-
env: deps=high
28-
- php: 8.0
29-
env: deps=low
3026
fast_finish: true
3127

3228
cache:
@@ -36,15 +32,6 @@ cache:
3632
- ~/php-ext
3733

3834
before_install:
39-
- |
40-
# Enable extra ppa
41-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157
42-
sudo add-apt-repository -y ppa:ondrej/php
43-
sudo rm /etc/apt/sources.list.d/google-chrome.list
44-
sudo rm /etc/apt/sources.list.d/mongodb-3.4.list
45-
sudo apt update
46-
sudo apt install -y librabbitmq-dev libsodium-dev php-uuid zlib1g-dev
47-
4835
- |
4936
# General configuration
5037
set -e
@@ -91,26 +78,6 @@ before_install:
9178
}
9279
export -f tfold
9380
94-
# tpecl is a helper to compile and cache php extensions
95-
tpecl () {
96-
local ext_name=$1
97-
local ext_so=$2
98-
local INI=$3
99-
local input=${4:-yes}
100-
local ext_dir=$(php -r "echo ini_get('extension_dir');")
101-
local ext_cache=~/php-ext/$(basename $ext_dir)/$ext_name
102-
103-
if [[ -e $ext_cache/$ext_so ]]; then
104-
echo extension = $ext_cache/$ext_so >> $INI
105-
else
106-
rm ~/.pearrc /tmp/pear 2>/dev/null || true
107-
mkdir -p $ext_cache
108-
echo $input | pecl -q install -f $ext_name &&
109-
cp $ext_dir/$ext_so $ext_cache
110-
fi
111-
}
112-
export -f tpecl
113-
11481
- |
11582
# Install sigchild-enabled PHP to test the Process component on the lowest PHP matrix line
11683
if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then
@@ -135,30 +102,6 @@ before_install:
135102
done
136103
find ~/.phpenv -name xdebug.ini -delete
137104
138-
- |
139-
# Install extra PHP extensions
140-
for PHP in $TRAVIS_PHP_VERSION $php_extra; do
141-
export PHP=$PHP
142-
phpenv global $PHP
143-
composer self-update
144-
composer self-update --2
145-
INI=~/.phpenv/versions/$PHP/etc/conf.d/travis.ini
146-
if ! php --ri sodium > /dev/null; then
147-
tfold ext.libsodium tpecl libsodium sodium.so $INI
148-
fi
149-
if [[ $PHP = 8.* ]]; then
150-
tfold ext.memcached tpecl memcached-3.1.5 memcached.so $INI
151-
else
152-
tfold ext.zookeeper tpecl zookeeper-0.7.2 zookeeper.so $INI
153-
tfold ext.amqp tpecl amqp-1.10.2 amqp.so $INI
154-
fi
155-
156-
tfold ext.mongodb tpecl mongodb-1.9.0 mongodb.so $INI
157-
tfold ext.apcu tpecl apcu-5.1.19 apcu.so $INI
158-
tfold ext.igbinary tpecl igbinary-3.1.6 igbinary.so $INI
159-
tfold ext.redis tpecl redis-5.2.3 redis.so $INI "no"
160-
done
161-
162105
install:
163106
- |
164107
# Install the phpunit-bridge from a PR if required
@@ -199,16 +142,6 @@ install:
199142
git diff --staged -- src/Symfony/Bridge/PhpUnit/ | git apply -R --index
200143
fi
201144
202-
- |
203-
# For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components
204-
if [[ $deps = high && $TRAVIS_BRANCH = *.x ]]; then
205-
export FLIP='^'
206-
export SYMFONY_VERSION=$(echo "$SYMFONY_VERSIONS" | grep -o '/[1-9]\.[0-9].*' | tail -n 1 | sed s/.//) &&
207-
git fetch --depth=2 origin $SYMFONY_VERSION &&
208-
git checkout -m FETCH_HEAD &&
209-
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
210-
fi
211-
212145
- |
213146
# Skip the phpunit-bridge on bugfix-branches when $deps is empty
214147
if [[ ! $deps && ! $TRAVIS_BRANCH = *.x ]]; then
@@ -255,50 +188,14 @@ install:
255188
fi
256189
phpenv global $PHP
257190
rm vendor/composer/package-versions-deprecated -Rf
258-
([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; cp composer.json composer.bak; composer require --dev --no-update mongodb/mongodb)
259191
tfold 'composer update' $COMPOSER_UP
260192
tfold 'phpunit install' ./phpunit install
261-
if [[ $deps = high ]]; then
262-
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" || X=1
263-
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
264-
COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
265-
266-
if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = *.x && $TRAVIS_PULL_REQUEST != false && $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1) = *.x ]]; then
267-
export FLIP='^'
268-
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
269-
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
270-
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
271-
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
272-
git fetch --depth=2 origin $SYMFONY_VERSION
273-
git checkout -m FETCH_HEAD
274-
COMPONENTS=$(echo "$COMPONENTS" | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort)
275-
(cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
276-
[[ ! $COMPONENTS ]] || tfold 'phpunit install' SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 ./phpunit install
277-
[[ ! $COMPONENTS ]] || echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && rm composer.lock vendor/ -Rf && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" || X=1
278-
fi
279-
280-
[[ ! $X ]] || (exit 1)
281-
elif [[ $deps = low ]]; then
282-
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT_X'"
283-
else
284-
if [[ $PHP = 8.0* ]]; then
285-
# add return types before running the test suite
286-
sed -i 's/"\*\*\/Tests\/"//' composer.json
287-
composer install --optimize-autoloader
288-
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php
289-
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php # ensure the script is idempotent
290-
PHPUNIT_X="$PHPUNIT_X,legacy"
291-
fi
292-
293-
echo "$COMPONENTS" | parallel --gnu "tfold {} $PHPUNIT_X {}"
294193
295-
tfold src/Symfony/Component/Console.tty $PHPUNIT src/Symfony/Component/Console --group tty
296-
tfold src/Symfony/Bridge/Twig.tty $PHPUNIT src/Symfony/Bridge/Twig --group tty
194+
tfold src/Symfony/Component/HttpKernel $PHPUNIT src/Symfony/Component/HttpKernel
297195
298-
if [[ $PHP = ${MIN_PHP%.*} ]]; then
299-
export PHP=$MIN_PHP
300-
tfold src/Symfony/Component/Process.sigchild SYMFONY_DEPRECATIONS_HELPER=weak php-$MIN_PHP/sapi/cli/php ./phpunit --colors=always src/Symfony/Component/Process/
301-
fi
196+
if [[ $PHP = ${MIN_PHP%.*} ]]; then
197+
export PHP=$MIN_PHP
198+
tfold src/Symfony/Component/Process.sigchild SYMFONY_DEPRECATIONS_HELPER=weak php-$MIN_PHP/sapi/cli/php ./phpunit --colors=always src/Symfony/Component/Process/
302199
fi
303200
}
304201
export -f run_tests

0 commit comments

Comments
 (0)