Skip to content

Commit

Permalink
Test multiple PHP versions on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
samiahmedsiddiqui committed Aug 16, 2024
1 parent d36c420 commit 7c76307
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/reusable-coding-standards-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@
##
name: PHP coding standards

on:
workflow_call:
inputs:
php-version:
description: 'The PHP version to use.'
required: false
type: 'string'
default: 'latest'
# on:
# workflow_call:
# inputs:
# php-version:
# description: 'The PHP version to use.'
# required: false
# type: 'string'
# default: 'latest'

jobs:
phpcs:
name: Run coding standards checks
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.0', '7.4', '8.0', '8.1', '8.2', '8.3']

permissions:
contents: read

name: PHP ${{ matrix.php-versions }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -28,8 +34,10 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
php-version: ${{ matrix.php-versions }}
tools: cs2pr
env:
runner: self-hosted

- name: Install Composer dependencies
run: composer install
Expand Down

0 comments on commit 7c76307

Please sign in to comment.