From 38c9067afad89a3bdbd02faeb312f0e81a852671 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Wed, 9 Nov 2022 16:06:38 -0700 Subject: [PATCH] Add test code coverage reporting --- .github/workflows/dendrite.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dendrite.yml b/.github/workflows/dendrite.yml index a37e45e46..bc5da641d 100644 --- a/.github/workflows/dendrite.yml +++ b/.github/workflows/dendrite.yml @@ -122,12 +122,14 @@ jobs: key: ${{ runner.os }}-go${{ matrix.go }}-test-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go${{ matrix.go }}-test- - - run: go test -json -v ./... 2>&1 | gotestfmt + - run: go test -json -v -covermode=atomic -coverprofile=coverage.txt ./... 2>&1 | gotestfmt env: POSTGRES_HOST: localhost POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: dendrite + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 # build Dendrite for linux with different architectures and go versions build: