Coverage updates, roll back makefile change, use travis specific script
This commit is contained in:
parent
449ea72e87
commit
9ae266f8fe
|
@ -33,7 +33,8 @@ before_script:
|
|||
- git config --global url.https://github.com/.insteadOf ssh://git@github.com/
|
||||
|
||||
script:
|
||||
- make test
|
||||
- make fmtcheck generate
|
||||
- bash scripts/travis.sh
|
||||
- go mod verify
|
||||
- make e2etest
|
||||
- GOOS=windows go build -mod=vendor
|
||||
|
|
2
Makefile
2
Makefile
|
@ -27,7 +27,7 @@ plugin-dev: generate
|
|||
# we run this one package at a time here because running the entire suite in
|
||||
# one command creates memory usage issues when running in Travis-CI.
|
||||
test: fmtcheck generate
|
||||
go list -mod=vendor $(TEST) | xargs -t -n4 go test $(TESTARGS) -mod=vendor -timeout=2m -parallel=4 -coverprofile=coverage.txt -covermode=atomic
|
||||
go list -mod=vendor $(TEST) | xargs -t -n4 go test $(TESTARGS) -mod=vendor -timeout=2m -parallel=4
|
||||
|
||||
# testacc runs acceptance tests
|
||||
testacc: fmtcheck generate
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
# Consistent output so travis does not think we're dead during long running
|
||||
# tests.
|
||||
export PING_SLEEP=30
|
||||
bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" &
|
||||
PING_LOOP_PID=$!
|
||||
|
||||
make testacc
|
||||
TEST_OUTPUT=$?
|
||||
|
||||
kill $PING_LOOP_PID
|
||||
exit $TEST_OUTPUT
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -mod=vendor -timeout=2m -parallel=4 -coverprofile=profile.out -covermode=atomic $d
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue