diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..e9933fb --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,19 @@ +on: [push, pull_request] +name: Generate coverage report +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.15.x + - name: Checkout code + uses: actions/checkout@v2 + - name: Generate coverage report + run: | + make coverage + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.txt diff --git a/README.md b/README.md index 83c998e..ce0a195 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ hdrhistogram-go PkgGoDev [![Gitter](https://badges.gitter.im/Join_Chat.svg)](https://gitter.im/HdrHistogram/HdrHistogram) ![Test](https://github.com/HdrHistogram/hdrhistogram-go/workflows/Test/badge.svg?branch=master) - [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/HdrHistogram/hdrhistogram-go/blob/master/LICENSE) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/HdrHistogram/hdrhistogram-go/blob/master/LICENSE) +[![Codecov](https://codecov.io/gh/HdrHistogram/hdrhistogram-go/branch/master/graph/badge.svg)](https://codecov.io/gh/HdrHistogram/hdrhistogram-go) A pure Go implementation of the [HDR Histogram](https://github.com/HdrHistogram/HdrHistogram).