@@ -184,24 +184,26 @@ jobs:
184
184
# matrix.mode = high-deps
185
185
echo "$COMPONENTS" | xargs -n1 | parallel -j +3 "_run_tests {} 'cd {} && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
186
186
187
+ # get a list of the patched components (relies on .github/build-packages.php being called in the previous step)
187
188
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
188
- COMPONENTS =$(git diff --name-only src/ | grep composer.json || true)
189
+ PATCHED_COMPONENTS =$(git diff --name-only src/ | grep composer.json || true)
189
190
190
- if [[ $COMPONENTS && $SYMFONY_VERSION = *.4 ]]; then
191
+ # for x.4 branches, checkout and test previous major with the patched components (only for patched components)
192
+ if [[ $PATCHED_COMPONENTS && $SYMFONY_VERSION = *.4 ]]; then
191
193
export FLIP='^'
192
194
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
193
195
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
194
196
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
195
197
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
196
198
git fetch --depth=2 origin $SYMFONY_VERSION
197
199
git checkout -m FETCH_HEAD
198
- COMPONENTS =$(echo "$COMPONENTS " | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort || true)
200
+ PATCHED_COMPONENTS =$(echo "$PATCHED_COMPONENTS " | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort || true)
199
201
(cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
200
- if [[ $COMPONENTS ]]; then
202
+ if [[ $PATCHED_COMPONENTS ]]; then
201
203
echo "::group::install phpunit"
202
204
./phpunit install
203
205
echo "::endgroup::"
204
- echo "$COMPONENTS " | parallel -j +3 "_run_tests {} 'cd {} && rm composer.lock vendor/ -Rf && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
206
+ echo "$PATCHED_COMPONENTS " | parallel -j +3 "_run_tests {} 'cd {} && rm composer.lock vendor/ -Rf && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
205
207
fi
206
208
fi
207
209
0 commit comments