diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..152d123 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: Test and coverage + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: 'stable' + - name: Run coverage + run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: Eclalang/hash \ No newline at end of file diff --git a/README.md b/README.md index 69e703c..c217680 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Hash library +[![Go Report Card](https://goreportcard.com/badge/github.com/Eclalang/hash)](https://goreportcard.com/report/github.com/Eclalang/hash) +[![codecov](https://codecov.io/gh/Eclalang/hash/graph/badge.svg?token=YNCIYERVBO)](https://codecov.io/gh/Eclalang/hash) + ## Candidate functions : | Func Name | Prototype | Description | Comments |