36 lines
667 B
YAML
36 lines
667 B
YAML
name: Build & Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ^1.20
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
file: ./coverage.txt
|
|
flags: unittests
|
|
name: codecov-umbrella
|