ci: add Gitea Actions build/test workflow

This commit is contained in:
2026-07-02 09:20:06 -05:00
parent 85f83a8aaf
commit 41a491564f
2 changed files with 53 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
name: CI
on:
push:
branches: [main]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '.gitea/workflows/ci.yml'
pull_request:
branches: [main]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '.gitea/workflows/ci.yml'
jobs:
build:
runs-on: cpu
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Format check
run: |
unformatted=$(find . -name '*.go' -not -path '*/testdata/*' -print0 | xargs -0 gofmt -l)
if [ -n "$unformatted" ]; then
echo "gofmt needs to run on:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...
- name: Static build
run: CGO_ENABLED=0 go build -ldflags="-w -s" -o shush ./cmd/shush
+3
View File
@@ -0,0 +1,3 @@
self-hosted-runner:
labels:
- cpu