From 4b184a6ae8d0e32283d6746083d6f3cb738a3dc8 Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 26 Nov 2022 14:46:51 +0000 Subject: [PATCH] fix code cov gen on gha --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c19c9e5a..0c99e9e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,11 +26,12 @@ jobs: # @todo run some tests on 'windows-latest' (needs test env setup scripts for windows to be developed) - php: '8.1' operating-system: ubuntu-22.04 - code-coverage: true - php: '8.0' operating-system: ubuntu-22.04 - php: '7.4' operating-system: ubuntu-22.04 + # nb: the version of phpunit we use does not support code coverage generation on php 8 + code-coverage: true - php: '7.3' operating-system: ubuntu-22.04 - php: '7.2' @@ -87,7 +88,7 @@ jobs: - name: run tests and upload coverage info if needed run: | - if [ "${{ matrix.code-coverage }}" != true ]; then + if [ -z "${{ matrix.code-coverage }}" ]; then ./vendor/bin/phpunit -v tests else ./tests/ci/setup/setup_code_coverage.sh enable @@ -96,6 +97,8 @@ jobs: wget https://uploader.codecov.io/latest/linux/codecov && \ chmod +x codecov && \ ./codecov -f coverage.clover + else + echo "WARNING: code coverage not generated. Is xdebug disabled?" fi fi -- 2.47.0