Skip to content

doc(readme): update api docs #139

doc(readme): update api docs

doc(readme): update api docs #139

Workflow file for this run

name: Generate code coverage badge
on:
pull_request:
branches:
- main
label:
types:
- created
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Update coverage badge
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run Test
run: |
go test -v ./... -covermode=count -coverprofile=coverage.out
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out # optional
flags: unittests # optional