diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d9c7e9c..fc20efb 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -32,3 +32,9 @@ jobs: - name: Build and Test run: ./script/test.sh + + - name: Upload test coverage result + uses: actions/upload-artifact@v1 + with: + name: Coverage + path: /tmp/coverage.html diff --git a/script/test.sh b/script/test.sh index ce26225..2f8d90b 100755 --- a/script/test.sh +++ b/script/test.sh @@ -15,5 +15,8 @@ docker build . # Run the integration tests with docker-compose docker-compose up --build --detach -go test -v ./... -tags integration -cover -docker-compose down \ No newline at end of file +go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out +docker-compose down + +# Convert the coverage data to html +go tool cover -html=/tmp/c.out -o /tmp/coverage.html \ No newline at end of file