Skip to content

Commit aa64a15

Browse files
philipstanislausvimukthi-git
authored andcommitted
Add code coverage reporting to codecov and corresponding badge (centrifuge#14)
1 parent b085977 commit aa64a15

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

Diff for: .travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ install:
2525
script:
2626
- make lint
2727
- make test-dockerized
28+
29+
after_success:
30+
- bash <(curl -s https://codecov.io/bash)

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ COPY . .
5858

5959
RUN make install
6060

61-
CMD ["make", "test"]
61+
CMD ["make", "test-cover"]

Diff for: Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ test: ## runs all tests in project
3636
@go test -v ./...
3737

3838
test-cover: ## runs all tests in project and report coverage
39-
@go test -cover -count=1 ./...
39+
@go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
40+
@mv coverage.txt shared
4041

4142
test-dockerized: ## runs the tests in a docker container against the Substrate Default Docker image
4243
@docker-compose build

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
44
[![GoDoc Reference](https://godoc.org/github.com/centrifuge/go-substrate-rpc-client?status.svg)](https://godoc.org/github.com/centrifuge/go-substrate-rpc-client)
55
[![Build Status](https://travis-ci.com/centrifuge/go-substrate-rpc-client.svg?branch=master)](https://travis-ci.com/centrifuge/go-substrate-rpc-client)
6+
[![codecov](https://codecov.io/gh/centrifuge/go-substrate-rpc-client/branch/master/graph/badge.svg)](https://codecov.io/gh/centrifuge/go-substrate-rpc-client)
67
[![Go Report Card](https://goreportcard.com/badge/github.com/centrifuge/go-substrate-rpc-client)](https://goreportcard.com/report/github.com/centrifuge/go-substrate-rpc-client)
78

89
Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls.

Diff for: docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ services:
1111
- 9944
1212
- 30333
1313
networks:
14-
centchain-network:
14+
gsrpc-network:
1515
ipv4_address: 172.42.0.2
1616
command: --dev --ws-external --rpc-external
1717
rpc-client-tests:
1818
build: .
1919
networks:
20-
centchain-network:
20+
gsrpc-network:
2121
ipv4_address: 172.42.0.99
2222
environment:
2323
- RPC_URL=http://172.42.0.2:9933
2424
networks:
25-
centchain-network:
25+
gsrpc-network:
2626
ipam:
2727
driver: default
2828
config:

Diff for: shared/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage.txt

0 commit comments

Comments
 (0)