From 7c76307de5571e7519b2f6341de605d4b6dc0d09 Mon Sep 17 00:00:00 2001 From: Sami Ahmed Siddiqui Date: Fri, 16 Aug 2024 15:46:06 +0500 Subject: [PATCH] Test multiple PHP versions on workflow --- .../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