Skip to content

Fix/coverage

Fix/coverage #13

Workflow file for this run

name: Test src
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./.github/actions/bootstrap
- name: Checkout
uses: actions/checkout@v4
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@v4
with:
go-version-file: "go.mod"
- name: Run lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
- name: Go run examples
shell: bash
run: ./.github/workflows/scripts/examples.sh
- name: Run Test
shell: bash
run: |
go test -v . -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
grep total < coverage.out | grep '100.0%'