Add codecov

This commit is contained in:
Trey Dockendorf 2020-02-20 14:29:26 -05:00
parent a3af84ed27
commit a4411e8ec8
4 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@ version: 2.1
orbs: orbs:
prometheus: prometheus/prometheus@0.4.0 prometheus: prometheus/prometheus@0.4.0
codecov: codecov/codecov@1.0.5
executors: executors:
# Whenever the Go version is updated here, .promu.yml should # Whenever the Go version is updated here, .promu.yml should
@ -17,6 +18,9 @@ jobs:
steps: steps:
- prometheus/setup_environment - prometheus/setup_environment
- run: make - run: make
- run: make coverage
- codecov/upload:
file: coverage.txt
- prometheus/store_artifact: - prometheus/store_artifact:
file: cgroup_exporter file: cgroup_exporter
build: build:

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/.tarballs /.tarballs
/.build /.build
/cgroup_exporter /cgroup_exporter
/coverage.txt

View File

@ -5,3 +5,6 @@ DOCKER_REPO ?= treydock
include Makefile.common include Makefile.common
DOCKER_IMAGE_NAME ?= cgroup_exporter DOCKER_IMAGE_NAME ?= cgroup_exporter
coverage:
go test -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...

View File

@ -3,6 +3,7 @@
[![Build Status](https://circleci.com/gh/treydock/cgroup_exporter/tree/master.svg?style=shield)](https://circleci.com/gh/treydock/cgroup_exporter) [![Build Status](https://circleci.com/gh/treydock/cgroup_exporter/tree/master.svg?style=shield)](https://circleci.com/gh/treydock/cgroup_exporter)
[![GitHub release](https://img.shields.io/github/v/release/treydock/cgroup_exporter?include_prereleases&sort=semver)](https://github.com/treydock/cgroup_exporter/releases/latest) [![GitHub release](https://img.shields.io/github/v/release/treydock/cgroup_exporter?include_prereleases&sort=semver)](https://github.com/treydock/cgroup_exporter/releases/latest)
![GitHub All Releases](https://img.shields.io/github/downloads/treydock/cgroup_exporter/total) ![GitHub All Releases](https://img.shields.io/github/downloads/treydock/cgroup_exporter/total)
[![codecov](https://codecov.io/gh/treydock/cgroup_exporter/branch/master/graph/badge.svg)](https://codecov.io/gh/treydock/cgroup_exporter)
# Check mount Prometheus exporter # Check mount Prometheus exporter