CI: Added coverage for integration tests

This commit is contained in:
diamondburned (Forefront) 2020-04-26 18:21:25 -07:00
parent c1ace1829b
commit 5a07d097da
2 changed files with 5 additions and 1 deletions

View File

@ -35,5 +35,8 @@ integration_test:
# go get first, so it doesn't count towards the timeout.
- go get ./...
# Timeout test after 120 seconds (2 minutes)
- timeout 120 go test -tags integration -v ./...
- timeout 120 go test -tags integration -v -coverprofile $COV ./...
- go tool cover -func $COV
| grep -F 'total:'
| sed -E 's|total:\s+\(.*?\)\s+([0-9]+\.[0-9]+%)|TEST_COVERAGE=\1|'

View File

@ -1,5 +1,6 @@
# arikawa
[![Pipeline status](https://gitlab.com/diamondburned/arikawa/badges/master/pipeline.svg?style=flat-square)](https://gitlab.com/diamondburned/arikawa/pipelines )
[![ Coverage](https://gitlab.com/diamondburned/arikawa/badges/master/coverage.svg?style=flat-square)](https://gitlab.com/diamondburned/arikawa/commits/master )
[![ Report Card](https://goreportcard.com/badge/github.com/diamondburned/arikawa?style=flat-square )](https://goreportcard.com/report/github.com/diamondburned/arikawa)
[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue?style=flat-square )](https://godoc.org/github.com/diamondburned/arikawa )