Skip to content

Merge pull request #401 from pedro-mendonca/dependabot/github_actions… #480

Merge pull request #401 from pedro-mendonca/dependabot/github_actions…

Merge pull request #401 from pedro-mendonca/dependabot/github_actions… #480

name: PHP Compatibility
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
paths:
# Any change to a PHP file should run checks.
- '**.php'
# These files configure Composer. Changes could affect the outcome.
- 'composer.*'
# This file configures PHP Compatibility. Changes could affect the outcome.
- 'phpcompat.xml'
# Changes to workflow files should always verify all workflows are successful.
- '.github/workflows/*.yml'
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
# Runs PHP compatibility check.
#
# Violations are reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Sets up PHP.
# - Logs debug information about the runner container.
# - Installs Composer dependencies (use cache if possible).
# - Logs PHP_CodeSniffer debug information.
# - Runs the PHP compatibility tests.
php-compatibility:
name: Check PHP compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@2.26.0
with:
php-version: '7.4' # Results are the same across all versions, check only in the last stable version.
coverage: none
env:
fail-fast: false
- name: Log debug information
run: |
php --version
composer --version
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
- name: Log PHPCS debug information
run: composer phpcs-i
- name: Run PHP compatibility tests
run: composer compat:php