From ac693a45c74805a3e6c77b505a2c48c5efcfbc59 Mon Sep 17 00:00:00 2001 From: Jonny Stoten Date: Fri, 5 Jul 2024 12:28:47 +0100 Subject: [PATCH] Don't upload coverage results if we don't run e2e (#77) this way the coverage doesn't fluctuate between e2e and non-e2e test runs --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc48b36..7bb7a9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,13 +40,14 @@ jobs: uses: atomicjar/testcontainers-cloud-setup-action@v1 with: token: ${{ secrets.TC_CLOUD_TOKEN }} - - name: go test ubuntu e2e + - name: go test including e2e if: matrix.os == 'ubuntu-latest' && github.actor != 'dependabot[bot]' run: go test -tags=e2e -v ./... -coverprofile=coverage.out -covermode=atomic - - name: go test osx + - name: go test excluding e2e if: matrix.os == 'macos-latest' || github.actor == 'dependabot[bot]' - run: go test -v ./... -coverprofile=coverage.out -covermode=atomic + run: go test -v ./... - name: Upload coverage to Codecov + if: matrix.os == 'ubuntu-latest' && github.actor != 'dependabot[bot]' uses: codecov/codecov-action@v4 with: file: ./coverage.out