chore: add coverage tests #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
pull_request: | |
jobs: | |
test-and-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Install dependencies | |
run: go mod download | |
- name: Run tests with coverage | |
run: | | |
mkdir -p coverage | |
go test -v -coverpkg=./... -coverprofile=coverage/coverage.out -covermode=atomic ./... |