|
11 | 11 | EXT_MONGODB_VERSION: '1.5.5'
|
12 | 12 | EXT_PCOV_VERSION: '1.0.6'
|
13 | 13 | LEGACY: '0'
|
14 |
| - SYMFONY_REQUIRE: ^3.4 || ^4.0 |
| 14 | + SYMFONY_REQUIRE: ^3.4 || ^4.0 || ^5.0 |
15 | 15 |
|
16 | 16 | jobs:
|
17 | 17 | phpunit:
|
@@ -173,7 +173,7 @@ jobs:
|
173 | 173 | run: |
|
174 | 174 | mkdir -p /tmp/api-platform/core/var
|
175 | 175 | ln -s /tmp/api-platform/core/var tests/Fixtures/app/var
|
176 |
| - tests/Fixtures/app/console cache:clear -- |
| 176 | + tests/Fixtures/app/console cache:clear --ansi |
177 | 177 | - name: Enable code coverage
|
178 | 178 | if: matrix.coverage
|
179 | 179 | run: echo '::set-env name=COVERAGE::1'
|
@@ -1018,7 +1018,7 @@ jobs:
|
1018 | 1018 | run: |
|
1019 | 1019 | mkdir -p /tmp/api-platform/core/var
|
1020 | 1020 | ln -s /tmp/api-platform/core/var tests/Fixtures/app/var
|
1021 |
| - tests/Fixtures/app/console cache:clear -- |
| 1021 | + tests/Fixtures/app/console cache:clear --ansi |
1022 | 1022 | - name: Enable code coverage
|
1023 | 1023 | if: matrix.coverage
|
1024 | 1024 | run: echo '::set-env name=COVERAGE::1'
|
@@ -1114,3 +1114,154 @@ jobs:
|
1114 | 1114 | with:
|
1115 | 1115 | name: phpunit-logs-php${{ matrix.php }}-no-deprecations
|
1116 | 1116 | path: build/logs/phpunit
|
| 1117 | + |
| 1118 | + phpunit-symfony-next: |
| 1119 | + name: PHPUnit (PHP ${{ matrix.php }}) (Symfony ${{ matrix.symfony }}) |
| 1120 | + runs-on: ubuntu-latest |
| 1121 | + container: |
| 1122 | + image: php:${{ matrix.php }}-alpine |
| 1123 | + options: >- |
| 1124 | + --tmpfs /tmp:exec |
| 1125 | + strategy: |
| 1126 | + matrix: |
| 1127 | + php: |
| 1128 | + - '7.3' |
| 1129 | + symfony: |
| 1130 | + - '4.4' |
| 1131 | + fail-fast: false |
| 1132 | + timeout-minutes: 20 |
| 1133 | + steps: |
| 1134 | + - name: Checkout |
| 1135 | + uses: actions/checkout@v1 |
| 1136 | + - name: Install system packages |
| 1137 | + run: | |
| 1138 | + apk add \ |
| 1139 | + jq \ |
| 1140 | + moreutils \ |
| 1141 | + unzip \ |
| 1142 | + - name: Install mongodb PHP extension |
| 1143 | + run: | |
| 1144 | + apk add $PHPIZE_DEPS |
| 1145 | + pecl install mongodb-$EXT_MONGODB_VERSION |
| 1146 | + docker-php-ext-enable mongodb |
| 1147 | + - name: Disable PHP memory limit |
| 1148 | + run: echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini |
| 1149 | + - name: Install Composer |
| 1150 | + run: wget -qO - https://raw.githubusercontent.com/composer/getcomposer.org/$COMPOSER_INSTALLER_COMMIT/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet |
| 1151 | + - name: Install Symfony Flex |
| 1152 | + run: | |
| 1153 | + composer global require --prefer-dist --no-progress --no-suggest --ansi \ |
| 1154 | + symfony/flex |
| 1155 | + - name: Allow unstable project dependencies |
| 1156 | + run: | |
| 1157 | + jq '. + {"minimum-stability": "dev"}' composer.json | sponge composer.json |
| 1158 | + - name: Update project dependencies |
| 1159 | + run: | |
| 1160 | + mkdir -p /tmp/api-platform/core/vendor |
| 1161 | + ln -s /tmp/api-platform/core/vendor vendor |
| 1162 | + composer update --no-progress --no-suggest --ansi |
| 1163 | + - name: Flag held back Symfony packages |
| 1164 | + env: |
| 1165 | + symfony_version: ${{ matrix.symfony }} |
| 1166 | + run: | |
| 1167 | + version_pattern=$symfony_version.x-dev |
| 1168 | + if [ "${symfony_version%.4}" != "$symfony_version" ]; then |
| 1169 | + current_major=${symfony_version%.4} |
| 1170 | + next_major=$((current_major + 1)) |
| 1171 | + version_pattern=$version_pattern'|'$next_major.0.x-dev'|'dev-master |
| 1172 | + fi |
| 1173 | + version_pattern=$(echo "$version_pattern" | sed -r 's/\./\\./g') |
| 1174 | + symfony_packages=$(composer show symfony/* | tr -s ' ' '\t' | cut -f1-2 | grep -vE 'polyfill|contracts|mercure') |
| 1175 | + ! echo "$symfony_packages" | grep -vE "$version_pattern" |
| 1176 | + - name: Clear test app cache |
| 1177 | + run: | |
| 1178 | + mkdir -p /tmp/api-platform/core/var |
| 1179 | + ln -s /tmp/api-platform/core/var tests/Fixtures/app/var |
| 1180 | + tests/Fixtures/app/console cache:clear --ansi |
| 1181 | + - name: Run PHPUnit tests |
| 1182 | + run: | |
| 1183 | + mkdir -p build/logs/phpunit |
| 1184 | + vendor/bin/phpunit --log-junit build/logs/phpunit/junit.xml --colors=always |
| 1185 | + - name: Upload test artifacts |
| 1186 | + if: always() |
| 1187 | + uses: actions/upload-artifact@v1 |
| 1188 | + with: |
| 1189 | + name: phpunit-logs-php${{ matrix.php }}-symfony${{ matrix.symfony }} |
| 1190 | + path: build/logs/phpunit |
| 1191 | + |
| 1192 | + behat-symfony-next: |
| 1193 | + name: Behat (PHP ${{ matrix.php }}) (Symfony ${{ matrix.symfony }}) |
| 1194 | + runs-on: ubuntu-latest |
| 1195 | + container: |
| 1196 | + image: php:${{ matrix.php }}-alpine |
| 1197 | + options: >- |
| 1198 | + --tmpfs /tmp:exec |
| 1199 | + strategy: |
| 1200 | + matrix: |
| 1201 | + php: |
| 1202 | + - '7.3' |
| 1203 | + symfony: |
| 1204 | + - '4.4' |
| 1205 | + fail-fast: false |
| 1206 | + timeout-minutes: 20 |
| 1207 | + steps: |
| 1208 | + - name: Checkout |
| 1209 | + uses: actions/checkout@v1 |
| 1210 | + - name: Install system packages |
| 1211 | + run: | |
| 1212 | + apk add \ |
| 1213 | + jq \ |
| 1214 | + moreutils \ |
| 1215 | + unzip \ |
| 1216 | + - name: Install mongodb PHP extension |
| 1217 | + run: | |
| 1218 | + apk add $PHPIZE_DEPS |
| 1219 | + pecl install mongodb-$EXT_MONGODB_VERSION |
| 1220 | + docker-php-ext-enable mongodb |
| 1221 | + - name: Disable PHP memory limit |
| 1222 | + run: echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini |
| 1223 | + - name: Install Composer |
| 1224 | + run: wget -qO - https://raw.githubusercontent.com/composer/getcomposer.org/$COMPOSER_INSTALLER_COMMIT/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet |
| 1225 | + - name: Install Symfony Flex |
| 1226 | + run: | |
| 1227 | + composer global require --prefer-dist --no-progress --no-suggest --ansi \ |
| 1228 | + symfony/flex |
| 1229 | + - name: Allow unstable project dependencies |
| 1230 | + run: | |
| 1231 | + jq '. + {"minimum-stability": "dev"}' composer.json | sponge composer.json |
| 1232 | + - name: Update project dependencies |
| 1233 | + run: | |
| 1234 | + mkdir -p /tmp/api-platform/core/vendor |
| 1235 | + ln -s /tmp/api-platform/core/vendor vendor |
| 1236 | + composer update --no-progress --no-suggest --ansi |
| 1237 | + - name: Flag held back Symfony packages |
| 1238 | + env: |
| 1239 | + symfony_version: ${{ matrix.symfony }} |
| 1240 | + run: | |
| 1241 | + version_pattern=$symfony_version.x-dev |
| 1242 | + if [ "${symfony_version%.4}" != "$symfony_version" ]; then |
| 1243 | + current_major=${symfony_version%.4} |
| 1244 | + next_major=$((current_major + 1)) |
| 1245 | + version_pattern=$version_pattern'|'$next_major.0.x-dev'|'dev-master |
| 1246 | + fi |
| 1247 | + version_pattern=$(echo "$version_pattern" | sed -r 's/\./\\./g') |
| 1248 | + symfony_packages=$(composer show symfony/* | tr -s ' ' '\t' | cut -f1-2 | grep -vE 'polyfill|contracts|mercure') |
| 1249 | + ! echo "$symfony_packages" | grep -vE "$version_pattern" |
| 1250 | + - name: Enable legacy integrations |
| 1251 | + if: startsWith(matrix.php, '7.3') |
| 1252 | + run: echo '::set-env name=LEGACY::1' |
| 1253 | + - name: Clear test app cache |
| 1254 | + run: | |
| 1255 | + mkdir -p /tmp/api-platform/core/var |
| 1256 | + ln -s /tmp/api-platform/core/var tests/Fixtures/app/var |
| 1257 | + tests/Fixtures/app/console cache:clear --ansi |
| 1258 | + - name: Run Behat tests |
| 1259 | + run: | |
| 1260 | + mkdir -p build/logs/behat |
| 1261 | + vendor/bin/behat --format=progress --out=std --format=junit --out=build/logs/behat/junit --profile="$(if [ "$LEGACY" = '1' ]; then echo 'default-legacy'; else echo 'default'; fi)" --no-interaction --colors |
| 1262 | + - name: Upload test artifacts |
| 1263 | + if: always() |
| 1264 | + uses: actions/upload-artifact@v1 |
| 1265 | + with: |
| 1266 | + name: behat-logs-php${{ matrix.php }}-symfony${{ matrix.symfony }} |
| 1267 | + path: build/logs/behat |
0 commit comments