chore: update supported PHP/Symfony versions #175
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
# Compiled from the following: | |
# - https://github.com/doctrine/DoctrineMigrationsBundle/blob/b31e69f/.github/workflows/continuous-integration.yml | |
# - https://github.com/FriendsOfSymfony/FOSRestBundle/blob/780be7e/.github/workflows/continuous-integration.yml | |
# - https://github.com/schmittjoh/serializer/blob/955efed/.github/workflows/ci.yaml | |
name: "Continuous Integration" | |
on: | |
push: | |
pull_request: | |
# Run the CI tasks weekly to catch any potential dependency regressions. | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
phpunit: | |
name: "PHPUnit on PHP ${{ matrix.php-version }} with Symfony ${{ matrix.symfony-require }}" | |
runs-on: "ubuntu-22.04" | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- php-version: 8.1 | |
composer-flags: "--ignore-platform-reqs" | |
symfony-require: "6.3.*" | |
- php-version: 8.2 | |
composer-flags: "--ignore-platform-reqs" | |
symfony-require: "6.3.*" | |
services: | |
ldap: | |
image: bitnami/openldap | |
ports: | |
- "3389:3389" | |
env: | |
LDAP_ADMIN_USERNAME: admin | |
LDAP_ADMIN_PASSWORD: a_great_password | |
LDAP_ROOT: dc=local,dc=com | |
LDAP_PORT_NUMBER: 3389 | |
LDAP_USERS: a | |
LDAP_PASSWORDS: a | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Install PHP with PCOV" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "pcov" | |
extensions: "json,ldap" | |
php-version: "${{ matrix.php-version }}" | |
ini-values: "zend.assertions=1" | |
- name: "Validate composer files" | |
run: "composer validate --strict" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/cache@v3" | |
with: | |
path: "~/.composer/cache" | |
key: php-${{ matrix.php-version }}-symfony-${{ matrix.symfony-require }}-composer-locked-${{ hashFiles('composer.lock') }} | |
restore-keys: | | |
php-${{ matrix.php-version }}-symfony-${{ matrix.symfony-require }}-composer-locked- | |
php-${{ matrix.php-version }}- | |
- name: "Install dependencies with composer" | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony-require }}" | |
run: | | |
composer global config --no-plugins allow-plugins.symfony/flex true | |
composer global require --no-progress --no-scripts --no-plugins symfony/flex | |
composer update --no-interaction --no-progress --ansi ${{ matrix.composer-flags }} | |
- name: "Run PHPUnit" | |
run: "vendor/bin/phpunit" |