From 5d515de6a33088d6e9721d30b0f77733e1071bff Mon Sep 17 00:00:00 2001 From: Sami Ahmed Siddiqui Date: Fri, 16 Aug 2024 15:46:33 +0500 Subject: [PATCH] Test multiple PHP versions on workflow (#93) --- .../reusable-coding-standards-php.yml | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-coding-standards-php.yml b/.github/workflows/reusable-coding-standards-php.yml index 2b22bb0..7d08cb3 100644 --- a/.github/workflows/reusable-coding-standards-php.yml +++ b/.github/workflows/reusable-coding-standards-php.yml @@ -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 @@ -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