diff --git a/.github/workflows/call-php-static-checks-and-test.yml b/.github/workflows/call-php-static-checks-and-test.yml index 06bfe0b..ee7133e 100644 --- a/.github/workflows/call-php-static-checks-and-test.yml +++ b/.github/workflows/call-php-static-checks-and-test.yml @@ -8,8 +8,8 @@ on: jobs: call-check-and-build-local: - # call local workflow if repository name is NOT CoreLibs-Composer-All - if: github.event.repository.name != 'CoreLibs-Composer-All' + # call local workflow if repository name is NOT Composer.corelibs-composer-all + if: github.event.repository.name != 'Composer.corelibs-composer-all' uses: ./.github/workflows/php-static-checks-and-tests.yml with: php-version: '8.4,8.5' @@ -22,8 +22,8 @@ jobs: opj-package-api-key: ${{ secrets.OPJ_PACKAGE_API_KEY }} call-check-and-build-remote: - # call remote workflow if repository name is CoreLibs-Composer-All - if: github.event.repository.name == 'CoreLibs-Composer-All' + # call remote workflow if repository name is Composer.corelibs-composer-all + if: github.event.repository.name == 'Composer.corelibs-composer-all' uses: OmnicomProduction-Japan/Content.github-actions/.github/workflows/php-static-checks-and-tests.yml@v1 with: php-version: '8.4,8.5' diff --git a/.github/workflows/php-static-checks-and-tests.yml b/.github/workflows/php-static-checks-and-tests.yml index 4217ed5..17e593e 100644 --- a/.github/workflows/php-static-checks-and-tests.yml +++ b/.github/workflows/php-static-checks-and-tests.yml @@ -194,11 +194,23 @@ jobs: - name: Test with phpunit id: run-phpunit run: | - phpunit --colors=never \ - --no-coverage \ - --coverage-text=phpunit-coverage.txt \ - --only-summary-for-coverage-text \ - --coverage-openclover=phpunit-openclover.xml + # if we are older than 12 there is no openclover + # version can start with ^ and then have numbers, so we need to remove the ^ and then compare the version numbers + phpunit_version="${{ matrix.phpunit-version }}" + phpunit_version="${phpunit_version#^}" + phpunit_version="${phpunit_version%%.*}" + if [ "$phpunit_version" -lt 12 ]; then + phpunit --colors=never \ + --no-coverage \ + --coverage-text=phpunit-coverage.txt \ + --coverage-clover=phpunit-openclover.xml + else + phpunit --colors=never \ + --no-coverage \ + --coverage-text=phpunit-coverage.txt \ + --only-summary-for-coverage-text \ + --coverage-openclover=phpunit-openclover.xml + fi; - name: Code Coverage Summary Report uses: saschanowak/CloverCodeCoverageSummary@1.1.1 @@ -248,33 +260,6 @@ jobs: EOF - if [ -f phpunit-coverage.txt ]; then - { - echo "