@@ -50,13 +50,14 @@ before_install:
50
50
set -e
51
51
stty cols 120
52
52
cp .github/composer-config.json "$(composer config home)/config.json"
53
+ git config --global user.email ""
54
+ git config --global user.name "Symfony"
53
55
export PHPUNIT=$(readlink -f ./phpunit)
54
56
export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data"
55
57
export COMPOSER_UP='composer update --no-progress --ansi'
56
58
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
57
- export SYMFONY_DEPRECATIONS_HELPER=max[indirect]=170
58
- export SYMFONY_FLEX_VERSIONS=$(curl -s https://flex.symfony.com/versions.json)
59
- export SYMFONY_FEATURE_BRANCH=$(echo $SYMFONY_FLEX_VERSIONS | jq -r '."dev"')
59
+ export SYMFONY_FEATURE_BRANCH=$(curl -s https://flex.symfony.com/versions.json | jq -r '."dev-name"')
60
+ export SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)
60
61
61
62
nanoseconds () {
62
63
local cmd="date"
@@ -181,11 +182,6 @@ install:
181
182
182
183
- |
183
184
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
184
- git config --global user.email ""
185
- git config --global user.name "Symfony"
186
-
187
- SYMFONY_VERSIONS=$(git ls-remote -q --heads);
188
-
189
185
if [[ ! $deps ]]; then
190
186
php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit
191
187
else
@@ -202,21 +198,18 @@ install:
202
198
fi
203
199
204
200
- |
205
- # For the feature- branch, when deps=high, the version before it is checked out and tested with the locally patched components
206
- if [[ $deps = high && $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH ]]; then
201
+ # For the highest branch, when deps=high, the version before it is checked out and tested with the locally patched components
202
+ if [[ $deps = high && $SYMFONY_VERSION = $(echo "$SYMFONY_VERSIONS" | tail -n 1 | sed s/.//) ]]; then
207
203
export FLIP='^'
208
- export SYMFONY_VERSION=$(echo $SYMFONY_FLEX_VERSIONS | jq -r '."next"')
209
- if [ $SYMFONY_VERSION = $SYMFONY_FEATURE_BRANCH ]; then
210
- export SYMFONY_VERSION = $(echo $SYMFONY_FLEX_VERSIONS | jq -r '."stable"')
211
- fi
204
+ export SYMFONY_VERSION=$(echo "$SYMFONY_VERSIONS" | grep -FB1 /$SYMFONY_VERSION | head -n 1 | sed s/.//) &&
212
205
git fetch --depth=2 origin $SYMFONY_VERSION &&
213
206
git checkout -m FETCH_HEAD &&
214
207
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
215
208
fi
216
209
217
210
- |
218
211
# Skip the phpunit-bridge on bugfix-branches when $deps is empty
219
- if [[ ! $deps && ! $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH ]]; then
212
+ if [[ ! $deps && $SYMFONY_VERSION ! = $SYMFONY_FEATURE_BRANCH ]]; then
220
213
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
221
214
fi
222
215
@@ -231,7 +224,7 @@ install:
231
224
232
225
- |
233
226
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
234
- [[ $deps = high && ${ SYMFONY_VERSION%.*} != $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1 | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
227
+ [[ $deps = high && $SYMFONY_VERSION = *.4 ]] && export LEGACY=,legacy
235
228
236
229
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
237
230
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
@@ -268,7 +261,7 @@ install:
268
261
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
269
262
COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
270
263
271
- if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = $SYMFONY_FEATURE_BRANCH && $TRAVIS_PULL_REQUEST != false && $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1) = $SYMFONY_FEATURE_BRANCH ]]; then
264
+ if [[ $COMPONENTS && $SYMFONY_VERSION = *.4 && $TRAVIS_PULL_REQUEST != false ]]; then
272
265
export FLIP='^'
273
266
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
274
267
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
0 commit comments