diff --git a/.github/workflows/cloud-tests.yml b/.github/workflows/cloud-tests.yml index 01dd87c238..8ec5469c63 100644 --- a/.github/workflows/cloud-tests.yml +++ b/.github/workflows/cloud-tests.yml @@ -25,6 +25,27 @@ jobs: steps: - name: allowed message run: echo "Allowed to run" + - name: check Github action bot comment + if: github.event_name == 'pull_request' + uses: peter-evans/find-comment@v3 + id: find-bot-comment + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: github-actions[bot] + body-includes: 'https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit' + - name: edit comment if exists + if: github.event_name == 'pull_request' && steps.find-bot-comment.outputs.comment-id != '' + uses: peter-evans/create-or-update-comment@v4 + with: + edit-mode: replace + comment-id: ${{ steps.find-bot-comment.outputs.comment-id }} + body: https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit/${{ github.event.pull_request.head.sha }} + - name: comment PR + if: github.event_name == 'pull_request' && steps.find-bot-comment.outputs.comment-id == '' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr comment ${{ github.event.pull_request.number }} -R mongodb/mongodb-atlas-kubernetes -b "https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit/${{ github.event.pull_request.head.sha }}" int-tests: needs: allowed diff --git a/.github/workflows/test-e2e-gov.yml b/.github/workflows/test-e2e-gov.yml index bfff6464da..0c1610c9d2 100644 --- a/.github/workflows/test-e2e-gov.yml +++ b/.github/workflows/test-e2e-gov.yml @@ -55,6 +55,7 @@ jobs: if: ${{ success() }} uses: codecov/codecov-action@v5 with: - files: test/e2e/coverprofile.out name: ${{ matrix.test }} + token: ${{ secrets.CODECOV_TOKEN }} + files: test/e2e/coverprofile.out verbose: true diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 6bda565c62..f1f6398a62 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -280,6 +280,7 @@ jobs: if: ${{ success() }} uses: codecov/codecov-action@v5 with: - files: test/e2e/coverprofile.out name: ${{ matrix.test }} + token: ${{ secrets.CODECOV_TOKEN }} + files: test/e2e/coverprofile.out verbose: true diff --git a/.github/workflows/test-int.yml b/.github/workflows/test-int.yml index 44e750f582..6d0678c15f 100644 --- a/.github/workflows/test-int.yml +++ b/.github/workflows/test-int.yml @@ -57,6 +57,7 @@ jobs: uses: codecov/codecov-action@v5 with: name: ${{ matrix.test }} + token: ${{ secrets.CODECOV_TOKEN }} files: ${{ matrix.path }}/coverprofile.out verbose: true diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index e29dcc61ac..b74b046759 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -28,5 +28,6 @@ jobs: uses: codecov/codecov-action@v5 with: name: unit-tests + token: ${{ secrets.CODECOV_TOKEN }} files: coverage.out verbose: true