From 7d42ed9d5e630d6c3725a29792b33bf953a5d0ea Mon Sep 17 00:00:00 2001 From: Go Kudo Date: Wed, 21 Aug 2024 18:23:39 +0000 Subject: [PATCH] fix workflow and coverage --- .github/octocov.yml | 4 +++- .github/workflows/coverage.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/octocov.yml b/.github/octocov.yml index ac79c4a..8c11969 100644 --- a/.github/octocov.yml +++ b/.github/octocov.yml @@ -3,12 +3,14 @@ coverage: - ../lcov.info acceptable: current >= 60% testExecutionTime: - acceptable: current <= 5min && diff < 5min + if: false comment: if: is_pull_request diff: datastores: - artifact://${GITHUB_REPOSITORY} +comment: + if: is_pull_request report: if: is_default_branch datastores: diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index e570fd2..e9e9363 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -1,6 +1,7 @@ name: Coverage permissions: contents: write + pull-requests: write on: push: branches: @@ -30,7 +31,7 @@ jobs: docker compose build --pull --no-cache --build-arg PLATFORM="linux/amd64" --build-arg IMAGE="php" --build-arg TAG="${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}" - name: Test with gcov run: | - docker compose run -v "$(pwd)/ext:/ext" --rm shell /bin/sh -c 'pskel test gcov && lcov --capture --directory "/ext" --output-file "/ext/lcov.info" --exclude "Zend/*" --exclude "third_party/*"' + docker compose run -v "$(pwd)/ext:/ext" --rm shell /bin/sh -c 'pskel test gcov && lcov --capture --directory "/ext" --output-file "/ext/lcov.info" --exclude "/usr/local/include/*" --exclude "third_party/*" && lcov --list "/ext/lcov.info"' - name: Upload coverage to artifact uses: actions/upload-artifact@v4 with: @@ -59,4 +60,5 @@ jobs: - name: Report coverage uses: k1LoW/octocov-action@v1 with: + github-token: ${{ secrets.GITHUB_TOKEN }} config: .github/octocov.yml