From 073b9107fd4e79a5af74e72911ce39fe19914ca1 Mon Sep 17 00:00:00 2001 From: Asif Nawaz Date: Thu, 21 Mar 2024 15:58:23 +0000 Subject: [PATCH] fix(php-idna and php-sdk workflows): reviewed coverage report generation implementation --- .github/workflows/php-idna-translator-release.yml | 7 ++++++- .github/workflows/php-idna-translator-test.yml | 13 +++++++------ .github/workflows/php-sdk-release.yml | 6 +++++- .github/workflows/php-sdk-test.yml | 5 +++++ 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/php-idna-translator-release.yml b/.github/workflows/php-idna-translator-release.yml index 204705f..b810d4f 100644 --- a/.github/workflows/php-idna-translator-release.yml +++ b/.github/workflows/php-idna-translator-release.yml @@ -33,14 +33,19 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ vars.RTLDEV_MW_CI_PHP_VERSION }} + coverage: xdebug - name: Install dependencies run: | npm ci echo "$HOME/.composer/vendor/bin" >> "$GITHUB_PATH" composer update --no-dev + - name: PHP Class Documentation + run: composer run-script docs + - name: Code Coverage Report + run: composer run-script coverage - name: Release env: GITHUB_TOKEN: ${{ secrets.RTLDEV_MW_CI_TOKEN }} TEAMS_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_CI_NOTIFICATION_URI }} COMMIT_SHA: ${{ github.sha }} - run: npx semantic-release + run: npx semantic-release \ No newline at end of file diff --git a/.github/workflows/php-idna-translator-test.yml b/.github/workflows/php-idna-translator-test.yml index 2d170e7..b809bc9 100644 --- a/.github/workflows/php-idna-translator-test.yml +++ b/.github/workflows/php-idna-translator-test.yml @@ -14,10 +14,6 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - name: Install Dependencies::PHP${{ matrix.php-version }} - run: | - echo "$HOME/.composer/vendor/bin" >> "$GITHUB_PATH" - composer update - name: Super Linter Code Base uses: github/super-linter/slim@v5 env: @@ -44,9 +40,14 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - name: Install PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: xdebug - name: Install Dependencies::PHP${{ matrix.php-version }} run: | echo "$HOME/.composer/vendor/bin" >> "$GITHUB_PATH" composer update - - name: Code Validation - run: composer run-script test + - name: Code Validation & Coverage + run: composer run-script coverage diff --git a/.github/workflows/php-sdk-release.yml b/.github/workflows/php-sdk-release.yml index 8cad826..80bf8a5 100644 --- a/.github/workflows/php-sdk-release.yml +++ b/.github/workflows/php-sdk-release.yml @@ -33,12 +33,16 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ vars.RTLDEV_MW_CI_PHP_VERSION }} + coverage: xdebug - name: Install dependencies run: | npm ci echo "$HOME/.composer/vendor/bin" >> "$GITHUB_PATH" composer update --no-dev - composer run-script docs + - name: PHP Class Documentation + run: composer run-script docs + - name: Code Coverage Report + run: composer run-script test - name: Release env: GITHUB_TOKEN: ${{ secrets.RTLDEV_MW_CI_TOKEN }} diff --git a/.github/workflows/php-sdk-test.yml b/.github/workflows/php-sdk-test.yml index 993d622..212b533 100644 --- a/.github/workflows/php-sdk-test.yml +++ b/.github/workflows/php-sdk-test.yml @@ -41,6 +41,11 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - name: Install PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: xdebug - name: Install Dependencies::PHP${{ matrix.php-version }} run: | echo "$HOME/.composer/vendor/bin" >> "$GITHUB_PATH"