Skip to content

Commit b008128

Browse files
committed
Add CI jobs for testing next release of Symfony
1 parent af558c3 commit b008128

File tree

2 files changed

+132
-4
lines changed

2 files changed

+132
-4
lines changed

.github/workflows/ci.yml

Lines changed: 131 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
run: |
174174
mkdir -p /tmp/api-platform/core/var
175175
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
177177
- name: Enable code coverage
178178
if: matrix.coverage
179179
run: echo '::set-env name=COVERAGE::1'
@@ -1018,7 +1018,7 @@ jobs:
10181018
run: |
10191019
mkdir -p /tmp/api-platform/core/var
10201020
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
10221022
- name: Enable code coverage
10231023
if: matrix.coverage
10241024
run: echo '::set-env name=COVERAGE::1'
@@ -1114,3 +1114,132 @@ jobs:
11141114
with:
11151115
name: phpunit-logs-php${{ matrix.php }}-no-deprecations
11161116
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+
env:
1134+
SYMFONY_REQUIRE: ^${{ matrix.symfony }}
1135+
steps:
1136+
- name: Checkout
1137+
uses: actions/checkout@v1
1138+
- name: Install system packages
1139+
run: |
1140+
apk add \
1141+
jq \
1142+
moreutils \
1143+
unzip \
1144+
- name: Install mongodb PHP extension
1145+
run: |
1146+
apk add $PHPIZE_DEPS
1147+
pecl install mongodb-$EXT_MONGODB_VERSION
1148+
docker-php-ext-enable mongodb
1149+
- name: Disable PHP memory limit
1150+
run: echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini
1151+
- name: Install Composer
1152+
run: wget -qO - https://raw.githubusercontent.com/composer/getcomposer.org/$COMPOSER_INSTALLER_COMMIT/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
1153+
- name: Install Symfony Flex
1154+
run: |
1155+
composer global require --prefer-dist --no-progress --no-suggest --ansi \
1156+
symfony/flex
1157+
- name: Allow unstable project dependencies
1158+
run: |
1159+
jq '. + {"minimum-stability": "dev"}' composer.json | sponge composer.json
1160+
- name: Update project dependencies
1161+
run: |
1162+
mkdir -p /tmp/api-platform/core/vendor
1163+
ln -s /tmp/api-platform/core/vendor vendor
1164+
composer update --no-progress --no-suggest --ansi
1165+
- name: Clear test app cache
1166+
run: |
1167+
mkdir -p /tmp/api-platform/core/var
1168+
ln -s /tmp/api-platform/core/var tests/Fixtures/app/var
1169+
tests/Fixtures/app/console cache:clear --ansi
1170+
- name: Run PHPUnit tests
1171+
run: |
1172+
mkdir -p build/logs/phpunit
1173+
vendor/bin/phpunit --log-junit build/logs/phpunit/junit.xml --colors=always
1174+
- name: Upload test artifacts
1175+
if: always()
1176+
uses: actions/upload-artifact@v1
1177+
with:
1178+
name: phpunit-logs-php${{ matrix.php }}-symfony${{ matrix.symfony }}
1179+
path: build/logs/phpunit
1180+
1181+
behat-symfony-next:
1182+
name: Behat (PHP ${{ matrix.php }}) (Symfony ${{ matrix.symfony }})
1183+
runs-on: ubuntu-latest
1184+
container:
1185+
image: php:${{ matrix.php }}-alpine
1186+
options: >-
1187+
--tmpfs /tmp:exec
1188+
strategy:
1189+
matrix:
1190+
php:
1191+
- '7.3'
1192+
symfony:
1193+
- '4.4'
1194+
fail-fast: false
1195+
timeout-minutes: 20
1196+
env:
1197+
SYMFONY_REQUIRE: ^${{ matrix.symfony }}
1198+
steps:
1199+
- name: Checkout
1200+
uses: actions/checkout@v1
1201+
- name: Install system packages
1202+
run: |
1203+
apk add \
1204+
jq \
1205+
moreutils \
1206+
unzip \
1207+
- name: Install mongodb PHP extension
1208+
run: |
1209+
apk add $PHPIZE_DEPS
1210+
pecl install mongodb-$EXT_MONGODB_VERSION
1211+
docker-php-ext-enable mongodb
1212+
- name: Disable PHP memory limit
1213+
run: echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini
1214+
- name: Install Composer
1215+
run: wget -qO - https://raw.githubusercontent.com/composer/getcomposer.org/$COMPOSER_INSTALLER_COMMIT/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
1216+
- name: Install Symfony Flex
1217+
run: |
1218+
composer global require --prefer-dist --no-progress --no-suggest --ansi \
1219+
symfony/flex
1220+
- name: Allow unstable project dependencies
1221+
run: |
1222+
jq '. + {"minimum-stability": "dev"}' composer.json | sponge composer.json
1223+
- name: Update project dependencies
1224+
run: |
1225+
mkdir -p /tmp/api-platform/core/vendor
1226+
ln -s /tmp/api-platform/core/vendor vendor
1227+
composer update --no-progress --no-suggest --ansi
1228+
- name: Enable legacy integrations
1229+
if: startsWith(matrix.php, '7.3')
1230+
run: echo '::set-env name=LEGACY::1'
1231+
- name: Clear test app cache
1232+
run: |
1233+
mkdir -p /tmp/api-platform/core/var
1234+
ln -s /tmp/api-platform/core/var tests/Fixtures/app/var
1235+
tests/Fixtures/app/console cache:clear --ansi
1236+
- name: Run Behat tests
1237+
run: |
1238+
mkdir -p build/logs/behat
1239+
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
1240+
- name: Upload test artifacts
1241+
if: always()
1242+
uses: actions/upload-artifact@v1
1243+
with:
1244+
name: behat-logs-php${{ matrix.php }}-symfony${{ matrix.symfony }}
1245+
path: build/logs/behat

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,5 @@
129129
"branch-alias": {
130130
"dev-master": "2.5.x-dev"
131131
}
132-
},
133-
"minimum-stability": "dev"
132+
}
134133
}

0 commit comments

Comments
 (0)