Skip to content

Commit 7913f6c

Browse files
authored
Adding codecov.io (#48)
1 parent 04a940d commit 7913f6c

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: codecov.io
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
name: Code building and testing
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Setup go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: ^1.17
19+
20+
- name: Running build from src/*.go
21+
run: |
22+
go build -o application src/*.go
23+
24+
- name: Runing tests for coverage
25+
run: |
26+
go test -race -coverprofile=coverage.out -covermode=atomic `go list ./... | grep -v vendor/`
27+
28+
- name: Uploading coverage to Codecov
29+
run: |
30+
bash <(curl -s https://codecov.io/bash)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# TibiaData API in Golang
22

33
[![GitHub CI](https://github.com/TibiaData/tibiadata-api-go/workflows/build/badge.svg?branch=main)](https://github.com/TibiaData/tibiadata-api-go/actions?query=workflow%3Abuild)
4+
[![Codecov](https://codecov.io/gh/TibiaData/tibiadata-api-go/branch/main/graph/badge.svg?token=PSBNLBI10C)](https://codecov.io/gh/TibiaData/tibiadata-api-go)
45
[![GitHub go.mod version](https://img.shields.io/github/go-mod/go-version/tibiadata/tibiadata-api-go)](https://github.com/tibiadata/tibiadata-api-go/blob/main/go.mod)
56
[![Docker version](https://img.shields.io/docker/v/tibiadata/tibiadata-api-go/latest)](https://hub.docker.com/r/tibiadata/tibiadata-api-go)
67
[![Docker size](https://img.shields.io/docker/image-size/tibiadata/tibiadata-api-go/latest)](https://hub.docker.com/r/tibiadata/tibiadata-api-go)

0 commit comments

Comments
 (0)