mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-06-10 00:13:42 +00:00
0370cabdc9
- Set dev as default branch, protect main (owner-only merge) - Add CI trigger for PRs targeting dev - Add PR template with checklist and branch targeting guide - Add CONTRIBUTING.md with branch strategy and review criteria - Update README clone command to use -b main for stable
42 lines
842 B
YAML
42 lines
842 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main, dev]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
go:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache-dependency-path: go.sum
|
|
- run: go build ./...
|
|
- run: go test -race ./...
|
|
- run: go vet ./...
|
|
|
|
web:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ui/web
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
cache-dependency-path: ui/web/pnpm-lock.yaml
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: pnpm build
|