Skip to content

Commit

Permalink
feat: add codecov support
Browse files Browse the repository at this point in the history
  • Loading branch information
elonzh committed May 13, 2021
1 parent da8489f commit 53ba4b8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ jobs:
with:
go-version: 1.16
- name: Test
run: go test -v ./...
run: make test
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
.idea
*.iml
dist
coverage.txt
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.PHONY: lint snapshot
.PHONY: lint test snapshot
lint:
golangci-lint run

test:
go test -coverprofile=coverage.txt -covermode=atomic

snapshot:
goreleaser --snapshot --rm-dist
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Clash Exporter for Prometheus

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/elonzh/clash_exporter?style=flat-square)](https://github.com/elonzh/clash_exporter/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/elonzh/clash_exporter?style=flat-square)](https://hub.docker.com/r/elonzh/clash_exporter)
[![GolangCI](https://golangci.com/badges/github.com/elonzh/clash_exporter.svg)](https://golangci.com)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/elonzh/clash_exporter/build?style=flat-square)](https://github.com/elonzh/clash_exporter/actions)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/elonzh/clash_exporter?style=flat-square)](https://github.com/elonzh/clash_exporter/releases)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/elonzh/clash_exporter/goreleaser?style=flat-square)](https://github.com/elonzh/clash_exporter/actions)
[![codecov](https://img.shields.io/codecov/c/github/elonzh/clash_exporter?style=flat-square&token=w1ngj45JWz)](https://codecov.io/gh/elonzh/clash_exporter)
[![GitHub license](https://img.shields.io/github/license/elonzh/clash_exporter?style=flat-square)](https://github.com/elonzh/clash_exporter/blob/main/LICENSE)

This is a simple server that scrapes [Clash](https://github.com/Dreamacro/clash) stats and exports them via HTTP for
Expand Down

0 comments on commit 53ba4b8

Please sign in to comment.