hatch-surf/.github/workflows/ci.yml
SoftwareEngineer eed408bb19 feat: foundation Go module, HTTP server, Docker packaging
- Go module (github.com/elfoundation/hatch) with go 1.25
- cmd/hatch: HTTP server with GET /healthz returning 200 OK
- Multi-stage Dockerfile producing static binary from scratch
- docker-compose with hatch + optional Caddy reverse proxy
- CI placeholder with Go test/lint stubs
- .gitignore, .dockerignore, .env.example

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-22 15:07:44 +02:00

53 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true
- name: Vet
run: go vet ./...
- name: Test
run: go test ./... -v -race
- name: Build
run: CGO_ENABLED=0 go build -o /dev/null ./cmd/hatch
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t hatch:ci .
- name: Smoke test the Docker image
run: |
docker run --rm -d -p 8080:8080 --name hatch-ci hatch:ci
sleep 2
curl -fsS http://localhost:8080/healthz | grep -q 'ok'
docker stop hatch-ci
lint-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check markdown formatting
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: '**/*.md'
continue-on-error: true