chore: tidy repo formatting and linting

This commit is contained in:
rcourtman
2025-09-29 20:19:18 +00:00
parent 657fa02142
commit eb82745638
171 changed files with 16834 additions and 11083 deletions
+57
View File
@@ -0,0 +1,57 @@
name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
backend:
name: Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify gofmt
run: |
fmt_out=$(gofmt -l ./cmd ./internal ./pkg)
if [ -n "$fmt_out" ]; then
echo "The following files are not gofmt formatted:"
echo "$fmt_out"
exit 1
fi
- name: Go vet
run: go vet ./...
- name: Go test
run: go test ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: ./...
frontend:
name: Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend-modern
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend-modern/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npm run type-check
- name: Format check
run: npm run format:check