From 7ba41c6ad6e1db36ca950f6bff03b7743ac5e967 Mon Sep 17 00:00:00 2001 From: Maxime Lagresle Date: Mon, 4 Nov 2024 08:52:00 +0100 Subject: [PATCH 1/3] use coverall 'parallel' for combining reports --- .github/workflows/tests.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4727769..bb0f932 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -97,24 +97,36 @@ jobs: run: go build -v ./... - name: Test with Embedded Client - run: go test -coverprofile=profile_embedded.cov -v ./... + run: go test -coverprofile=profile.cov -v ./... env: VAULTWARDEN_HOST: "127.0.0.1" VAULTWARDEN_PORT: "8080" TF_ACC: "1" TEST_USE_EMBEDDED_CLIENT: "1" + - name: Code Coverage for Embedded Client + continue-on-error: true + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov + parallel: true - name: Test with Official Client - run: go test -coverprofile=profile_official.cov -timeout 1000s -failfast -v ./... + run: go test -coverprofile=profile.cov -timeout 1000s -failfast -v ./... env: VAULTWARDEN_HOST: "127.0.0.1" VAULTWARDEN_PORT: "8080" TF_ACC: "1" - - - name: Combine Coverage - run: cat profile_embedded.cov profile_official.cov | sort -r | uniq > profile.cov - - name: Code Coverage + - name: Code Coverage for Official Client continue-on-error: true uses: shogo82148/actions-goveralls@v1 with: path-to-profile: profile.cov + parallel: true + + finish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: shogo82148/actions-goveralls@v1 + with: + parallel-finished: true From 867f83caee0a86a258384df8e218750c0914207b Mon Sep 17 00:00:00 2001 From: Maxime Lagresle Date: Mon, 4 Nov 2024 09:20:44 +0100 Subject: [PATCH 2/3] upgrade actions --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bb0f932..394584f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,26 +56,26 @@ jobs: uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '>=1.22.0' # Cache go build cache, used to speedup go test - name: Go Build Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.go-cache-paths.outputs.GOCACHE }} key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} # Cache go mod cache, used to speedup builds - name: Go Mod Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }} key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - name: Binaries Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.binaries.outputs.LOCAL_BINARIES }} key: ${{ steps.binaries.outputs.BWCLI_VERSION }} From 725dc574548eff0b86fc801d2d1cc002e241a883 Mon Sep 17 00:00:00 2001 From: Maxime Lagresle Date: Mon, 4 Nov 2024 09:39:10 +0100 Subject: [PATCH 3/3] set coverpkg --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 394584f..12fe372 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -97,7 +97,7 @@ jobs: run: go build -v ./... - name: Test with Embedded Client - run: go test -coverprofile=profile.cov -v ./... + run: go test -coverprofile=profile.cov -v -coverpkg=./... ./... env: VAULTWARDEN_HOST: "127.0.0.1" VAULTWARDEN_PORT: "8080" @@ -111,7 +111,7 @@ jobs: parallel: true - name: Test with Official Client - run: go test -coverprofile=profile.cov -timeout 1000s -failfast -v ./... + run: go test -coverprofile=profile.cov -timeout 1000s -failfast -v -coverpkg=./... ./... env: VAULTWARDEN_HOST: "127.0.0.1" VAULTWARDEN_PORT: "8080"