Files
gochat/.github/workflows/ci.yml
T
Rogeeandrogee b971b09ac7 H-409: restore frontend ESLint and Prettier baseline (#72)
* H-409: restore frontend lint baseline

* ci(H-409): check representative frontend lint

---------

Co-authored-by: Rogee <rogee@ipao.vip>
2026-08-21 14:11:08 +08:00

49 lines
1.5 KiB
YAML

name: GoChat CI/CD Pipeline
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
jobs:
backend:
name: Backend (SQLite)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: backend/go.mod
cache-dependency-path: backend/go.sum
- name: Test
working-directory: backend
env:
GOCHAT_TEST_DB: sqlite
run: go test ./internal/... ./pkg/... ./cmd/...
- name: Build
working-directory: backend
run: go build ./...
- name: Vet
working-directory: backend
run: go vet ./...
frontend:
name: Frontend Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- run: pnpm install --frozen-lockfile
- name: ESLint representative JS/Vue files
run: pnpm --dir frontend exec eslint app/javascript/dashboard/components-next/captain/assistant/AssistantPlayground.spec.js app/javascript/dashboard/components-next/captain/assistant/AssistantPlayground.vue
- name: Prettier representative JS/Vue files
run: pnpm --dir frontend exec prettier --check app/javascript/dashboard/components-next/captain/assistant/AssistantPlayground.spec.js app/javascript/dashboard/components-next/captain/assistant/AssistantPlayground.vue
- run: pnpm --dir frontend build