From 2f127d6e7166b201f72b26cb20fc2da4785afef6 Mon Sep 17 00:00:00 2001 From: Antoine Gelloz Date: Tue, 14 Feb 2023 16:07:53 +0100 Subject: [PATCH] CI: Upload test coverage to Codecov (#60) --- .github/workflows/pull_request.yml | 6 ++++++ .github/workflows/release.yml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7da25cb01..2c73ce592 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -97,6 +97,12 @@ jobs: with: go-version-file: './go.work' - run: task ${{ matrix.folder }}:tests + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v3 + with: + directory: ./components/${{ matrix.folder }} + fail_ci_if_error: false # optional (default = false) + verbose: true # optional (default = false) Docker: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de019cc5e..41c73e0dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,6 +67,13 @@ jobs: cache-dependency-path: 'components/${{ needs.Extract.outputs.service }}/go.sum' cache: true - run: task ${{ needs.Extract.outputs.service }}:tests + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v3 + with: + directory: 'components/${{ needs.Extract.outputs.service }}' + name: '${{ needs.Extract.outputs.service }} ${{ needs.Extract.outputs.version }}' + fail_ci_if_error: false # optional (default = false) + verbose: true # optional (default = false) GoReleaser: name: GoReleaser