Skip to content

Test with Composer 2.6.6, 2.5.8 and 2.2.22 #148

Test with Composer 2.6.6, 2.5.8 and 2.2.22

Test with Composer 2.6.6, 2.5.8 and 2.2.22 #148

Workflow file for this run

name: "Build"
on:
push:
paths-ignore:
- '**.md'
- '.appveyor.yml'
- '.editorconfig'
- '.gitattributes'
- 'LICENSE'
pull_request:
paths-ignore:
- '**.md'
- '.appveyor.yml'
- '.editorconfig'
- '.gitattributes'
- 'LICENSE'
# Allow manually triggering the workflow
workflow_dispatch:
jobs:
test:
name: "Run the test suite"
runs-on: "ubuntu-latest"
continue-on-error: ${{ matrix.experimental == true }}
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
strategy:
matrix:
php-version:
- "5.3"
- "5.4"
- "5.5"
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
tools:
- "composer:v1"
- "composer:v2"
include:
- php-version: "8.2"
tools: "composer:v2"
- php-version: "8.3"
tools: "composer:v2"
composer-options: "--ignore-platform-reqs"
experimental: true
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
ini-values: "error_reporting=-1, display_errors=On, zend.assertions=1"
tools: "${{ matrix.tools }}"
php-version: "${{ matrix.php-version }}"
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
composer-options: "${{ matrix.composer-options }}"
- name: "Check PHP syntax"
run: "find src/ -type f -name '*.php' -print0 | xargs -0 -n1 -P4 -- php -l -f"
- name: "Run the test suite"
run: "composer test"
bc-tests:
name: "Run backward compatibility tests"
runs-on: "ubuntu-latest"
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
tools: "composer:v2"
php-version: "8.0"
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
- name: "Run the backward compatibility tests"
run: "composer test:bc"
analysis:
name: "Run static analysis"
runs-on: "ubuntu-latest"
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
tools: "composer:v2, composer-normalize, phpstan"
php-version: "8.0"
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
- name: "Normalize composer.json"
run: "composer-normalize --dry-run --no-check-lock --no-update-lock"
- name: "Check for PSR-4 violations"
run: "composer dump-autoload --optimize --strict-psr --no-scripts"
- name: "PHPStan Analyse"
run: "phpstan analyse --error-format=github"