From c1033bed392c1c6358b48a17fe95697d6a83b8cc Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 7 Mar 2026 08:42:36 +0300 Subject: [PATCH] ci: set up build & lint workflow Signed-off-by: NotAShelf Change-Id: I98f116b592535a5a1b97563b8e9d26da6a6a6964 --- .github/workflows/go.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..ad17e79 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,44 @@ +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