46
46
key : composer-${{ github.sha }}
47
47
restore-keys : composer-
48
48
49
- - name : Download phpunit
50
- run : |
51
- rm composer.*
52
- composer init --no-interaction --name "async-aws/aws"
53
-
54
- echo ::group::Download
55
- composer require symfony/phpunit-bridge
56
- echo ::endgroup::
57
-
58
- echo ::group::Install
59
- ./vendor/bin/simple-phpunit install
60
- echo ::endgroup::
61
-
62
49
- name : Modify composer.json - default
63
50
run : |
64
51
CURRENT_DIR=$(pwd)
69
56
cd "$CURRENT_DIR/$COMPONENT"
70
57
71
58
sed -i -re 's/"require": \{/"repositories": [{"type": "path","url": "..\/..\/Core", "options": {"versions": {"async-aws\/core": "dev-master"}}, "canonical": ${{matrix.strategy != 'lowest' && 'true' || 'false'}} }],"require": \{/' composer.json
72
- sed -i -re 's/"require": \{/"minimum-stability": "dev","prefer-stable": true,"require": \{/' composer.json
59
+ composer config minimum-stability dev
60
+ composer config prefer-stable true
61
+ composer require --dev --no-update symfony/phpunit-bridge
73
62
cat composer.json
74
63
75
64
echo ::endgroup::
82
71
echo "$CURRENT_DIR/$COMPONENT"
83
72
cd "$CURRENT_DIR/$COMPONENT"
84
73
85
- sed -i -re 's/"require": \{/"minimum-stability": "dev","prefer-stable": true,"require": \{/' composer.json
74
+ sed -i -re 's/"require": \{/"conflict": \{"phpunit\/phpunit": ">=10.0"\},"require": \{/' composer.json
75
+ composer config minimum-stability dev
76
+ composer config prefer-stable true
86
77
cat composer.json
87
78
88
79
echo ::endgroup::
102
93
cd "$CURRENT_DIR/$COMPONENT"
103
94
104
95
localExit=0
96
+ composer require symfony/phpunit-bridge --no-update --no-install
105
97
composer update --no-interaction --no-scripts --prefer-dist --optimize-autoloader ${{ matrix.strategy == 'lowest' && '--prefer-lowest' || '' }} $COMPOSER_OPTIONS || localExit=1
98
+ ./vendor/bin/simple-phpunit install
106
99
echo ::endgroup::
107
100
if [ $localExit -ne 0 ]; then
108
101
echo "::error::$COMPONENT error"
@@ -118,11 +111,13 @@ jobs:
118
111
if [ -n "$OVERRIDE_SYMFONY_DEPRECATIONS_HELPER" ]; then
119
112
export SYMFONY_DEPRECATIONS_HELPER=$OVERRIDE_SYMFONY_DEPRECATIONS_HELPER
120
113
fi
114
+ CURRENT_DIR=$(pwd)
121
115
for COMPONENT in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
122
116
do
123
117
echo ::group::$COMPONENT
124
118
localExit=0
125
- ./vendor/bin/simple-phpunit -c ./$COMPONENT 2>&1 || localExit=1
119
+ cd "$CURRENT_DIR/$COMPONENT"
120
+ ./vendor/bin/simple-phpunit 2>&1 || localExit=1
126
121
ok=$(( $localExit || $ok ))
127
122
echo ::endgroup::
128
123
if [ $localExit -ne 0 ]; then
0 commit comments