This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
Update README.md #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI Tests" | |
on: | |
pull_request: | |
push: | |
env: | |
fail-fast: true | |
PHPUNIT_FLAGS: "-v" | |
SYMFONY_DEPRECATIONS_HELPER: weak | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: PHP v${{ matrix.php }}, Symfony v${{ matrix.symfony }}} with Mongo v${{ matrix.mongodb }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { php: 7.4, mongodb: 3.6, symfony: "5.4.*", composer-flags: '--prefer-stable'} | |
- { php: 8.2, mongodb: 3.6, symfony: "5.4.*", composer-flags: '--prefer-stable'} | |
- { php: 8.2, mongodb: 3.6, symfony: "6.0.*", composer-flags: '--prefer-stable'} | |
- { php: 8.2, mongodb: 3.6, symfony: "6.1.*", composer-flags: '--prefer-stable' } | |
- { php: 8.2, mongodb: 3.6, symfony: "6.2.*", composer-flags: '--prefer-stable' } | |
- { php: 8.2, mongodb: 3.6, symfony: "6.3.*@dev", composer-flags: '' } | |
services: | |
mongo: | |
image: mongo:${{ matrix.mongodb }} | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Installing php" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: curl,mbstring,xdebug,mongodb | |
ini-values: date.timezone="Europe/Paris" | |
coverage: xdebug | |
tools: "composer:v2,flex" | |
- name: Show PHP version | |
run: php -v && composer -V | |
- name: Download Composer cache dependencies from cache | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: "Require symfony/messenger" | |
run: "composer require --dev symfony/doctrine-messenger --no-update" | |
if: "${{ startsWith(matrix.symfony, '5.3') || startsWith(matrix.symfony, '5.4') }}" | |
- name: Cache Composer dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ matrix.os }}-composer- | |
- name: Install dependencies | |
run: | | |
perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json | |
composer config platform.ext-mongo 1.6.16 | |
composer require alcaeus/mongo-php-adapter --no-update | |
composer update ${{ matrix.composer-flags }} --prefer-dist | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony }}" | |
- name: "Run PHPUnit Tests" | |
run: "composer test" |