diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 34565a7..bc0d157 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -22,4 +22,9 @@ jobs: run: go install ./cmd/litestream - name: Run unit tests - run: make testdata && go test -v ./... + run: make testdata && go test -v --coverprofile=.coverage.out ./... && go tool cover -html .coverage.out -o .coverage.html + + - uses: actions/upload-artifact@v3 + with: + name: code-coverage + path: coverage.html diff --git a/.gitignore b/.gitignore index 6acf881..7f08fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.coverage.* .DS_Store /dist