ci.yml: lint, test, build on PRs to main. release.yml: multi-platform binaries + Docker image on version tags. Targets: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64. Docker pushed to ghcr.io/smart-mcp-proxy/synapbus. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- uses: golangci/golangci-lint-action@v6
|
|
with:
|
|
version: latest
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: npm
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Build web frontend
|
|
run: |
|
|
cd web && npm ci && npm run build
|
|
|
|
- name: Copy web assets
|
|
run: |
|
|
rm -rf internal/web/dist
|
|
cp -r web/build internal/web/dist
|
|
|
|
- name: Run tests
|
|
run: CGO_ENABLED=0 go test -count=1 -timeout 120s ./...
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- name: Verify binary builds
|
|
run: CGO_ENABLED=0 go build -o /dev/null ./cmd/synapbus/
|