update appveyor to go 1.11, add support for code coverage generation in tests

main
Ajitem Sahasrabuddhe 5 years ago
parent 826954c979
commit b6bfbe97f8
No known key found for this signature in database
GPG Key ID: 5B0EE10DAA76876C

@ -5,23 +5,27 @@ osx_image: xcode8.3
go: 1.11.x go: 1.11.x
os: os:
- linux - linux
- osx - osx
cache: cache:
directories: directories:
- node_modules - node_modules
before_script: before_script:
- go get github.com/urfave/gfmrun/... || true - go get github.com/urfave/gfmrun/... || true
- go get golang.org/x/tools/cmd/goimports - go get golang.org/x/tools/cmd/goimports
- if [ ! -f node_modules/.bin/markdown-toc ] ; then - if [ ! -f node_modules/.bin/markdown-toc ] ; then
npm install markdown-toc ; npm install markdown-toc ;
fi fi
script: script:
- ./runtests gen - ./runtests gen
- ./runtests vet - ./runtests vet
- ./runtests test - ./runtests test
- ./runtests gfmrun - ./runtests gfmrun
- ./runtests toc - ./runtests toc
after_success:
- ./coverage.sh
- bash <(curl -s https://codecov.io/bash)

@ -8,19 +8,19 @@ clone_folder: c:\gopath\src\github.com\urfave\cli
environment: environment:
GOPATH: C:\gopath GOPATH: C:\gopath
GOVERSION: 1.8.x GOVERSION: 1.11.x
PYTHON: C:\Python36-x64 PYTHON: C:\Python36-x64
PYTHON_VERSION: 3.6.x PYTHON_VERSION: 3.6.x
PYTHON_ARCH: 64 PYTHON_ARCH: 64
install: install:
- set PATH=%GOPATH%\bin;C:\go\bin;%PATH% - set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
- go version - go version
- go env - go env
- go get github.com/urfave/gfmrun/... - go get github.com/urfave/gfmrun/...
- go get -v -t ./... - go get -v -t ./...
build_script: build_script:
- python runtests vet - python runtests vet
- python runtests test - python runtests test
- python runtests gfmrun - python runtests gfmrun

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
echo "" > coverage.txt
for f in $(ls *.coverprofile); do
cat $f >> coverage.txt
rm $f
done

@ -34,10 +34,6 @@ def main(sysargs=sys.argv[:]):
def _test(): def _test():
if check_output('go version'.split()).split()[2] < 'go1.2':
_run('go test -v .')
return
coverprofiles = [] coverprofiles = []
for subpackage in ['', 'altsrc']: for subpackage in ['', 'altsrc']:
coverprofile = 'cli.coverprofile' coverprofile = 'cli.coverprofile'

Loading…
Cancel
Save