Add coverage data to github action
This commit is contained in:
parent
95963e9b29
commit
f1e6311366
2 changed files with 11 additions and 2 deletions
6
.github/workflows/docker-image.yml
vendored
6
.github/workflows/docker-image.yml
vendored
|
@ -32,3 +32,9 @@ jobs:
|
||||||
|
|
||||||
- name: Build and Test
|
- name: Build and Test
|
||||||
run: ./script/test.sh
|
run: ./script/test.sh
|
||||||
|
|
||||||
|
- name: Upload test coverage result
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Coverage
|
||||||
|
path: /tmp/coverage.html
|
||||||
|
|
|
@ -15,5 +15,8 @@ docker build .
|
||||||
|
|
||||||
# Run the integration tests with docker-compose
|
# Run the integration tests with docker-compose
|
||||||
docker-compose up --build --detach
|
docker-compose up --build --detach
|
||||||
go test -v ./... -tags integration -cover
|
go test -v ./... -tags integration -cover -coverprofile=/tmp/c.out
|
||||||
docker-compose down
|
docker-compose down
|
||||||
|
|
||||||
|
# Convert the coverage data to html
|
||||||
|
go tool cover -html=/tmp/c.out -o /tmp/coverage.html
|
Loading…
Add table
Add a link
Reference in a new issue