2026-08-20 21:30:40 -07:00
|
|
|
# Forgejo Actions CI — verification only (vet, test, build).
|
|
|
|
|
# Build and push happens in build.yaml on main push.
|
|
|
|
|
# Note: Forgejo reads .forgejo/workflows/, not .github/workflows/.
|
|
|
|
|
# runs-on: docker matches the only label the cluster runner declares.
|
2026-08-19 21:48:11 -07:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [main]
|
|
|
|
|
pull_request:
|
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
verify:
|
|
|
|
|
name: Test, vet, build
|
|
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
|
|
|
|
image: golang:1.25-bookworm
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: go vet
|
|
|
|
|
run: go vet ./...
|
|
|
|
|
|
|
|
|
|
# The race detector needs cgo, so this cannot run with CGO_ENABLED=0.
|
|
|
|
|
- name: go test -race
|
|
|
|
|
run: go test ./... -race
|
|
|
|
|
|
|
|
|
|
- name: Static build
|
|
|
|
|
run: CGO_ENABLED=0 go build -trimpath -o gateway ./cmd/gateway
|
|
|
|
|
|
|
|
|
|
- name: govulncheck
|
|
|
|
|
run: |
|
|
|
|
|
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
|
|
|
govulncheck ./...
|
|
|
|
|
continue-on-error: true
|