Skip to content

add codecov support

add codecov support #9

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install dependencies
run: go mod tidy
- name: Build
run: go build -v ./...
- name: Test with Codecov
run: go test -v -race -covermode=atomic -coverprofile=coverage.txt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.txt