Skip to content

Update README.md

Update README.md #40

Workflow file for this run

name: Code Coverage
on:
push:
branches:
- main
- initilization
jobs:
test:
runs-on: ubuntu-latest
name: Update coverage badge
steps:
- name: Checkout
uses: actions/checkout@v2
with:
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@v2
with:
go-version: '1.19'
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Test
run: |
go test -race -covermode=atomic -coverprofile=coverage.out
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}