Send coverage from AppVeyor.

This commit is contained in:
Qi Xiao 2017-12-21 19:58:25 +00:00
parent 2f4239d49e
commit 71775b750e
2 changed files with 10 additions and 5 deletions

View File

@ -8,8 +8,9 @@ environment:
install:
- echo %PATH%
- echo %GOPATH%
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%;C:\msys64\usr\bin
- go version
- go env
- choco install codecov
build_script:
- go test github.com/elves/elvish/...
- make appveyor

View File

@ -31,13 +31,16 @@ cover/all: $(PKG_COVERS)
# Disable coverage reports for pull requests. The general testability of the
# code is pretty bad and it is premature to require contributors to maintain
# code coverage.
upload-coverage: cover/all
upload-coverage-travis: cover/all
test "$(TRAVIS_PULL_REQUEST)" = false \
&& echo "$(TRAVIS_GO_VERSION)" | grep -q '^1.9' \
&& curl -s https://codecov.io/bash -o codecov.bash \
&& bash codecov.bash -f cover/all \
|| echo "not sending to codecov.io"
upload-coverage-appveyor: cover/all
codecov -f cover/all
upload-bin:
test "$(TRAVIS_OS_NAME)" = linux \
&& echo "$(TRAVIS_GO_VERSION)" | grep -q '^1.9' \
@ -47,6 +50,7 @@ upload-bin:
&& ./elvish build-and-upload.elv \
|| echo "not build-and-uploading"
travis: testmain upload-coverage upload-bin
travis: testmain upload-coverage-travis upload-bin
appveyor: testmain upload-coverage-appveyor
.PHONY: default get generate test testmain upload-coverage upload-bin travis
.PHONY: default get generate test testmain upload-coverage-travis upload-coverage-appveyor upload-bin travis