Skip to content

Commit 874a74a

Browse files
authored
add codecov (#11)
1 parent 1794506 commit 874a74a

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.appveyor.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@ matrix:
1515
build: off
1616
test_script:
1717
- set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
18-
- go test -v ./...
18+
- go test -v -coverprofile=profile.out -covermode=atomic ./...
19+
after_test:
20+
- ps: |
21+
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
22+
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
23+
bash codecov.sh -f "profile.out" -t $env:CODECOV_TOKEN -cF windows
1924
deploy: off

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ matrix:
88
install:
99
- echo pass
1010
script:
11-
- go test -v ./...
11+
- go test -v -coverprofile=profile.out -covermode=atomic ./...
12+
after_success:
13+
- CODECOV_TAGS=$TRAVIS_OS_NAME
14+
- if [[ $TRAVIS_OS_NAME = osx ]]; then CODECOV_TAGS=$CODECOV_TAGS,$TRAVIS_OSX_IMAGE ; fi
15+
- if [[ ! -z $POSTGRESQL_VERSION ]]; then CODECOV_TAGS=$CODECOV_TAGS,postgresql${POSTGRESQL_VERSION} ; fi
16+
- if [[ ! -z $RABBITMQ_VERSION ]]; then CODECOV_TAGS=$CODECOV_TAGS,rabbitmq${RABBITMQ_VERSION} ; fi
17+
- bash <(curl -s https://codecov.io/bash) -f "profile.out" -cF $CODECOV_TAGS
1218
jobs:
1319
include:
1420
- {os: linux, dist: trusty, sudo: required, env: 'POSTGRESQL_VERSION=9.2'}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ci-tricks [![Build Status](https://travis-ci.org/smola/ci-tricks.svg?branch=master)](https://travis-ci.org/smola/ci-tricks) [![Build status](https://ci.appveyor.com/api/projects/status/github/smola/ci-tricks?branch=master&svg=true)](https://ci.appveyor.com/project/smola/ci-tricks)
1+
# ci-tricks [![Build Status](https://travis-ci.org/smola/ci-tricks.svg?branch=master)](https://travis-ci.org/smola/ci-tricks) [![Build status](https://ci.appveyor.com/api/projects/status/github/smola/ci-tricks?branch=master&svg=true)](https://ci.appveyor.com/project/smola/ci-tricks) [![codecov](https://codecov.io/gh/smola/ci-tricks/branch/master/graph/badge.svg)](https://codecov.io/gh/smola/ci-tricks)
22

33
**ci-tricks** is a single-binary that can be run on multiple continuous integration providers to setup the environment in an efficient way.
44

0 commit comments

Comments
 (0)