diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2577f88..df85e2a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -4,24 +4,31 @@ name: Go on: - push: - branches: ["main"] - pull_request: - branches: ["main"] + push: + branches: ["main"] + pull_request: + branches: ["main"] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: "1.23" + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.23" - - name: Build - run: go build -v ./... + - name: Build + run: go build -v ./... - - name: Test - run: go test -v ./... + - name: Tests + run: | + go install github.com/mattn/goveralls@latest + go test -race -covermode atomic -coverprofile=covprofile ./... + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: covprofile + if: github.event.pull_request.merged diff --git a/README.md b/README.md index 5fd9aba..7c1cea6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@

pocache gopher

[![](https://github.com/naughtygopher/pocache/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/naughtygopher/pocache/actions) -[![](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/naughtygopher/pocache) +[![Go Reference](https://pkg.go.dev/badge/github.com/naughtygopher/pocache.svg)](https://pkg.go.dev/github.com/naughtygopher/pocache) +[![Go Report Card](https://goreportcard.com/badge/github.com/naughtygopher/pocache)](https://goreportcard.com/report/github.com/naughtygopher/pocache) +[![Coverage Status](https://coveralls.io/repos/github/naughtygopher/pocache/badge.svg?branch=main)](https://coveralls.io/github/naughtygopher/pocache?branch=main) # Pocache