Add test code coverage reporting

This commit is contained in:
Devon Hudson 2022-11-09 16:06:38 -07:00
parent bdaae060cc
commit 38c9067afa
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -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: