diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..73a96e5 --- /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/encoding \ No newline at end of file diff --git a/README.md b/README.md index a78a908..cb459dd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Encoding library +[![Go Report Card](https://goreportcard.com/badge/github.com/Eclalang/encoding)](https://goreportcard.com/report/github.com/Eclalang/encoding) +[![codecov](https://codecov.io/gh/Eclalang/encoding/graph/badge.svg?token=YNCIYERVBO)](https://codecov.io/gh/Eclalang/encoding) + ## Candidate functions : | Func Name | Prototype | Description | Comments | diff --git a/encoding_lib_test.go b/encoding_test.go similarity index 100% rename from encoding_lib_test.go rename to encoding_test.go