Test for multiple packages

This commit is contained in:
Mickael Remond 2018-01-01 19:02:30 +01:00
parent 843059b096
commit fef7d1ec50
No known key found for this signature in database
GPG key ID: E6F6045D79965AA3
2 changed files with 13 additions and 1 deletions

View file

@ -2,7 +2,7 @@
steps:
- name: test
service: build
command: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
command: ./test.sh
- name: codecov
service: build
command: bash -c "curl -s https://codecov.io/bash"

12
test.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done