From 8653f908fd945e4dc6ff5808a533ba21b0d77c9c Mon Sep 17 00:00:00 2001 From: Rasmus Schultz Date: Tue, 28 May 2024 10:57:02 +0200 Subject: [PATCH] upload code coverage --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e46b1d9..994697f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,14 +7,26 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php_version: [8.1, 8.2, 8.3] + include: + - php_version: 8.1 + - php_version: 8.2 + - php_version: 8.3 + code_coverage: upload steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 2 # Required by Scrutinizer (Ocular) - name: Set up Docker Compose run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Run tests - run: ./test.sh ${{ matrix.php_version }} + run: ./test.sh ${{ matrix.php_version }} ${{ matrix.code_coverage }} + + - name: Upload Scrutinizer coverage + uses: sudo-bot/action-scrutinizer@latest + if: github.repository == 'mindplay-dk/sql' && matrix.code_coverage == 'upload' + with: + cli-args: "--format=php-clover test/build/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"