watchdog/.github/workflows/go.yml
NotAShelf c1033bed39
ci: set up build & lint workflow
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I98f116b592535a5a1b97563b8e9d26da6a6a6964
2026-03-07 08:48:33 +03:00

44 lines
828 B
YAML

name: Build & Test with Go
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Download dependencies
run: go mod download
- name: Run tests
run: go test -v -race ./...
- name: Build
run: go build . -o watchdog
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest