From 0d5ca013c7b20a250d0d5c5b837148dae5fb2f19 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sun, 19 Apr 2026 21:05:55 +0200 Subject: [PATCH] ci: add go and bun checks --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5d7caed --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: ci + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: setup go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: setup bun + uses: oven-sh/setup-bun@v2 + + - name: install templ + run: go install github.com/a-h/templ/cmd/templ@latest + + - name: verify templates generated + run: | + templ generate + if [ -n "$(git status --porcelain -- '*_templ.go')" ]; then + echo "templ output is out of date" + git status --short -- '*_templ.go' + exit 1 + fi + + - name: install frontend deps + run: bun install --frozen-lockfile + + - name: typecheck + run: bun run typecheck + + - name: build assets + run: bun run build:assets + + - name: go test + run: go test ./... + + - name: go vet + run: go vet ./...