Files
gastown/.github/workflows/ci.yml
Olivier Debeuf De Rijcker 170e81d548 fix: deploy SessionStart hooks in gt install for Mayor role
Adds CI fix to run go generate before build steps.

- Adds claude.EnsureSettingsForRole() call in gt install after CLAUDE.md
- Adds go generate ./internal/formula/... to ci.yml (test, lint, integration jobs)
- Adds go generate ./internal/formula/... to integration.yml

The go generate step creates the embedded formula JSON files that are
gitignored but required for the go:embed directive in embed.go.

Fixes #84

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 11:52:03 +01:00

111 lines
2.8 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# Fast check to catch accidental .beads/issues.jsonl changes from contributors
check-no-beads-changes:
name: Check for .beads changes
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check for .beads/issues.jsonl changes
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^\.beads/issues\.jsonl$"; then
echo "This PR includes changes to .beads/issues.jsonl"
echo ""
echo "This file is the project's issue database and should not be modified in PRs."
echo ""
echo "To fix, run:"
echo " git checkout origin/main -- .beads/issues.jsonl"
echo " git commit --amend"
echo " git push --force"
echo ""
exit 1
fi
echo "No .beads/issues.jsonl changes detected"
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Configure Git
run: |
git config --global user.name "CI Bot"
git config --global user.email "ci@gastown.test"
- name: Generate embedded files
run: go generate ./internal/formula/...
- name: Build
run: go build -v ./cmd/gt
- name: Test
run: go test -v -race -short ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Generate embedded files
run: go generate ./internal/formula/...
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
args: --timeout=5m
integration:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Configure Git
run: |
git config --global user.name "CI Bot"
git config --global user.email "ci@gastown.test"
- name: Install beads (bd)
run: go install github.com/steveyegge/beads/cmd/bd@latest
- name: Generate embedded files
run: go generate ./internal/formula/...
- name: Build gt
run: go build -v -o gt ./cmd/gt
- name: Add to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Integration Tests
run: go test -tags=integration -timeout=5m -v ./internal/cmd/...