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 @@