forked from quic-go/quic-go
run unit and integration tests separately, only generate coverage reports for unit tests
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -13,8 +13,10 @@ go:
|
||||
# setting the GOARCH directly doesn't work, since the value will be overwritten later
|
||||
# so set it to a temporary environment variable first
|
||||
env:
|
||||
- TRAVIS_GOARCH=amd64
|
||||
- TRAVIS_GOARCH=386
|
||||
- TRAVIS_GOARCH=amd64 TESTMODE=unit
|
||||
- TRAVIS_GOARCH=amd64 TESTMODE=integration
|
||||
- TRAVIS_GOARCH=386 TESTMODE=unit
|
||||
- TRAVIS_GOARCH=386 TESTMODE=integration
|
||||
|
||||
# second part of the GOARCH workaround
|
||||
# now actually set the GOARCH env variable to the value of the temporary variable set earlier
|
||||
@@ -26,10 +28,7 @@ before_install:
|
||||
- go env # for debugging
|
||||
|
||||
script:
|
||||
- go get -t ./...
|
||||
- ginkgo -r --cover --randomizeAllSpecs --randomizeSuites --trace --progress
|
||||
- .travis/script.sh
|
||||
|
||||
after_success:
|
||||
- cat quic-go.coverprofile > coverage.txt
|
||||
- cat */*.coverprofile >> coverage.txt
|
||||
- bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
||||
- .travis/after_success.sh
|
||||
|
||||
9
.travis/after_success.sh
Executable file
9
.travis/after_success.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ ${TESTMODE} == "unit" ]; then
|
||||
cat quic-go.coverprofile > coverage.txt
|
||||
cat */*.coverprofile >> coverage.txt
|
||||
bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
||||
fi
|
||||
12
.travis/script.sh
Executable file
12
.travis/script.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
go get -t ./...
|
||||
if [ ${TESTMODE} == "unit" ]; then
|
||||
ginkgo -r --cover --randomizeAllSpecs --randomizeSuites --trace --progress --skipPackage integrationtests
|
||||
fi
|
||||
|
||||
if [ ${TESTMODE} == "integration" ]; then
|
||||
ginkgo -r --randomizeAllSpecs --randomizeSuites --trace --progress integrationtests
|
||||
fi
|
||||
Reference in New Issue
Block a user