2021-11-30 13:44:49 +01:00
|
|
|
name: PHPUnit
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
phpunit:
|
2022-01-25 22:39:43 +01:00
|
|
|
name: "PHPUnit - PHP ${{ matrix.php-version }}"
|
2021-11-30 13:44:49 +01:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
continue-on-error: false
|
|
|
|
env:
|
|
|
|
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
|
|
|
|
SYMFONY_DEPRECATIONS_HELPER: ${{matrix.symfony-deprecations-helper}}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version:
|
|
|
|
- "7.4"
|
|
|
|
- "8.0"
|
|
|
|
- "8.1"
|
|
|
|
deps:
|
2022-01-25 22:39:43 +01:00
|
|
|
- "stable"
|
2021-11-30 13:44:49 +01:00
|
|
|
symfony-require:
|
2022-01-25 22:55:56 +01:00
|
|
|
- "5.4.*"
|
2021-11-30 13:44:49 +01:00
|
|
|
symfony-deprecations-helper:
|
2022-01-25 22:55:56 +01:00
|
|
|
- "5"
|
2021-11-30 13:44:49 +01:00
|
|
|
include:
|
2022-01-25 22:29:47 +01:00
|
|
|
- symfony-require: "4.4.*"
|
2021-11-30 13:44:49 +01:00
|
|
|
php-version: "7.4"
|
2022-01-25 22:29:47 +01:00
|
|
|
deps: "low"
|
2022-01-25 22:55:56 +01:00
|
|
|
symfony-deprecations-helper: ""
|
2021-11-30 13:44:49 +01:00
|
|
|
|
2022-01-25 22:55:56 +01:00
|
|
|
- symfony-require: "4.4.*"
|
2021-11-30 13:44:49 +01:00
|
|
|
php-version: "7.4"
|
2022-01-25 22:39:43 +01:00
|
|
|
deps: "stable"
|
2022-01-25 23:08:07 +01:00
|
|
|
symfony-deprecations-helper: "5"
|
2021-11-30 13:44:49 +01:00
|
|
|
|
|
|
|
- symfony-require: "6.0.*"
|
|
|
|
php-version: "8.0"
|
2022-01-25 22:39:43 +01:00
|
|
|
deps: "stable"
|
2022-01-25 23:08:07 +01:00
|
|
|
symfony-deprecations-helper: "5"
|
2021-11-30 13:44:49 +01:00
|
|
|
|
2021-11-30 13:51:46 +01:00
|
|
|
- symfony-require: "6.0.*"
|
|
|
|
php-version: "8.1"
|
2022-01-25 22:39:43 +01:00
|
|
|
deps: "stable"
|
2022-01-25 23:08:07 +01:00
|
|
|
symfony-deprecations-helper: "5"
|
2021-11-30 13:44:49 +01:00
|
|
|
|
|
|
|
fail-fast: true
|
|
|
|
|
|
|
|
steps:
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Checkout code"
|
2021-11-30 13:44:49 +01:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Install PHP with extensions"
|
2021-11-30 13:44:49 +01:00
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
coverage: none
|
|
|
|
php-version: ${{ matrix.php-version }}
|
|
|
|
extensions: mbstring, intl, pdo, pdo_sqlite, sqlite3
|
|
|
|
ini-values: date.timezone=UTC
|
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Install dependencies with Composer"
|
|
|
|
run: "composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable"
|
2021-11-30 13:44:49 +01:00
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Cache dependencies installed with Composer"
|
2021-11-30 13:44:49 +01:00
|
|
|
uses: "actions/cache@v2"
|
|
|
|
with:
|
|
|
|
path: "~/.composer/cache"
|
|
|
|
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
|
|
|
|
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
|
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Install stable dependencies with Composer"
|
2021-11-30 13:44:49 +01:00
|
|
|
run: "composer update --no-interaction --prefer-dist --prefer-stable"
|
2022-01-25 22:39:43 +01:00
|
|
|
if: "${{ matrix.deps == 'stable' }}"
|
2021-11-30 13:44:49 +01:00
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Install dev dependencies with Composer"
|
2021-11-30 13:44:49 +01:00
|
|
|
run: "composer update --no-interaction --prefer-dist"
|
|
|
|
if: "${{ matrix.deps == 'dev' }}"
|
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Install lowest possible dependencies with Composer"
|
2021-11-30 13:44:49 +01:00
|
|
|
run: "composer update --no-interaction --prefer-dist --prefer-stable --prefer-lowest"
|
|
|
|
if: "${{ matrix.deps == 'low' }}"
|
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Install PHPUnit"
|
2022-01-26 09:54:34 +01:00
|
|
|
run: "composer run-script test install"
|
2021-11-30 13:44:49 +01:00
|
|
|
|
2022-01-25 22:39:43 +01:00
|
|
|
- name: "Run tests"
|
2022-01-26 09:54:34 +01:00
|
|
|
run: "composer run-script test -v"
|