Enhancement: Add support for PHP 8.0 #190
Workflow file for this run
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
# https://docs.github.com/en/actions | ||
name: "Integrate" | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: null | ||
push: | ||
branches: | ||
- "master" | ||
env: | ||
PHP_EXTENSIONS: "mbstring" | ||
jobs: | ||
coding-standards: | ||
name: "Coding Standards" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.1" | ||
dependencies: | ||
- "locked" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
- name: "Lint YAML files" | ||
uses: "ibiqlik/[email protected]" | ||
with: | ||
config_file: ".yamllint.yaml" | ||
file_or_dir: "." | ||
strict: true | ||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
- name: "Validate composer.json and composer.lock" | ||
run: "composer validate --ansi --strict" | ||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: "${{ env.COMPOSER_CACHE_DIR }}" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
- name: "Run ergebnis/composer-normalize" | ||
run: "composer normalize --ansi --dry-run" | ||
- name: "Cache cache directory for friendsofphp/php-cs-fixer" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: ".build/php-cs-fixer" | ||
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}" | ||
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-" | ||
- name: "Run friendsofphp/php-cs-fixer" | ||
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose" | ||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
phpunit-version: | ||
- "6.0.0" | ||
php-version: | ||
- "7.1" | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
dependencies: | ||
- "lowest" | ||
- "locked" | ||
- "highest" | ||
include: | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.1" | ||
dependencies: "lowest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.1" | ||
dependencies: "highest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.2" | ||
dependencies: "lowest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.2" | ||
dependencies: "highest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.3" | ||
dependencies: "lowest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.3" | ||
dependencies: "highest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.4" | ||
dependencies: "lowest" | ||
- phpunit-version: "7.0.0" | ||
php-version: "7.4" | ||
dependencies: "highest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "7.2" | ||
dependencies: "lowest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "7.2" | ||
dependencies: "highest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "7.3" | ||
dependencies: "lowest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "7.3" | ||
dependencies: "highest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "7.4" | ||
dependencies: "lowest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "7.4" | ||
dependencies: "highest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "8.0" | ||
dependencies: "lowest" | ||
- phpunit-version: "8.0.0" | ||
php-version: "8.0" | ||
dependencies: "highest" | ||
- phpunit-version: "9.0.0" | ||
php-version: "7.3" | ||
dependencies: "lowest" | ||
- phpunit-version: "9.0.0" | ||
php-version: "7.3" | ||
dependencies: "highest" | ||
- phpunit-version: "9.0.0" | ||
php-version: "7.4" | ||
dependencies: "lowest" | ||
- phpunit-version: "9.0.0" | ||
php-version: "7.4" | ||
dependencies: "highest" | ||
- phpunit-version: "9.0.0" | ||
php-version: "8.0" | ||
dependencies: "lowest" | ||
- phpunit-version: "9.0.0" | ||
php-version: "8.0" | ||
dependencies: "highest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: "${{ env.COMPOSER_CACHE_DIR }}" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
- name: "Remove platform configuration with composer" | ||
if: "matrix.dependencies != 'locked'" | ||
run: "composer config platform.php --ansi --unset" | ||
- name: "Remove incompatible dependencies with composer" | ||
if: "matrix.dependencies != 'locked'" | ||
run: "composer remove ergebnis/license ergebnis/php-cs-fixer-config phpspec/prophecy phpunit/phpunit --ansi --dev --no-interaction --no-progress" | ||
- name: "Require phpunit/phpunit:^${{ matrix.phpunit-version }}" | ||
run: "composer require phpunit/phpunit:^${{ matrix.phpunit-version }} --ansi --dev --update-with-dependencies" | ||
- name: "Require phpspec/prophecy" | ||
if: "matrix.phpunit-version = '8.0.0' or matrix.phpunit-version = '9.0.0'" | ||
Check failure on line 222 in .github/workflows/integrate.yaml
|
||
run: "composer require phpspec/prophecy --ansi --dev --update-with-dependencies" | ||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
- name: "Cache cache directory for phpstan/phpstan" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: ".build/phpstan" | ||
key: "php-${{ matrix.php-version }}-phpstan-${{ github.sha }}" | ||
restore-keys: "php-${{ matrix.php-version }}-phpstan-" | ||
- name: "Show phpstan/phpstan version" | ||
run: "vendor/bin/phpstan --ansi --version" | ||
- name: "Show phpunit/phpunit version" | ||
run: "vendor/bin/phpunit --version" | ||
- name: "Run phpstan/phpstan with extension" | ||
run: "vendor/bin/phpstan analyse --ansi --configuration=phpstan-with-extension.neon --memory-limit=-1" | ||
- name: "Run phpstan/phpstan without extension" | ||
run: "vendor/bin/phpstan analyse --ansi --configuration=phpstan-without-extension.neon --memory-limit=-1" | ||
tests: | ||
name: "Tests" | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.1" | ||
dependencies: | ||
- "locked" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
- name: "Set up problem matchers for phpunit/phpunit" | ||
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" | ||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: "${{ env.COMPOSER_CACHE_DIR }}" | ||
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | ||
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | ||
uses: "./.github/actions/composer/composer/install" | ||
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
- name: "Run tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=phpunit.xml" |