Skip to content

add demo file

add demo file #85

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
GO_VERSION: '1.23.2'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Generate Code with Templ
run: go run github.com/a-h/templ/cmd/templ generate
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Vet
run: go vet -v ./...
- name: Tidy
run: go mod tidy -diff
- name: Check Go Format
run: |
fmt_output=$(go fmt ./...)
if [ -n "$fmt_output" ]; then
echo "Go code is not formatted according to go fmt."
echo "$fmt_output"
exit 1
fi
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0