Skip to content

Simplify unit tests #17

Simplify unit tests

Simplify unit tests #17

Workflow file for this run

name: Go Test and Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test and coverage
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
check-latest: true
- name: Verify dependencies
run: |
go mod verify
go mod download
go mod tidy
- name: Run tests with coverage
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true