28 lines
529 B
YAML
28 lines
529 B
YAML
name: Unit Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.24'
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Run unit tests
|
|
run: go test -v ./... -coverprofile=coverage.out
|
|
|
|
- name: Print coverage report
|
|
run: go tool cover -func=coverage.out
|
|
continue-on-error: true |