Files
gastown/.github/workflows/integration.yml
julianknutsen 5178fa7f0a fix(ci,tests): pin bd to v0.47.1 and fix hash-like test suffixes
Pin bd (beads CLI) to v0.47.1 in CI workflows and fix test agent IDs
that trigger bd's isLikelyHash() prefix extraction logic.

Changes:
- Pin bd to v0.47.1 in ci.yml and integration.yml (v0.47.2 has routing
  defaults that cause prefix mismatch errors)
- Fix TestCloseAndClearAgentBead_FieldClearing: change agent IDs from
  `test-testrig-polecat-0` to `test-testrig-polecat-all_fields_populated`
- Fix TestCloseAndClearAgentBead_ReasonVariations: change agent IDs from
  `test-testrig-polecat-reason0` to `test-testrig-polecat-empty_reason`

Root cause: bd v0.47.1's isLikelyHash() treats suffixes of 3-8 chars
(with digits for 4+ chars) as potential git hashes. Patterns like `-0`
(single digit) and `-reason0` (7 chars with digit) caused bd to extract
the wrong prefix from agent IDs.

Using test names as suffixes (e.g., `all_fields_populated`) avoids this
because they're all >8 characters and won't trigger hash detection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:39:01 -08:00

47 lines
1.2 KiB
YAML

name: Integration Tests
on:
pull_request:
paths:
- 'internal/cmd/install.go'
- 'internal/cmd/rig.go'
- 'internal/config/**'
- 'internal/routing/**'
- 'internal/cmd/*_integration_test.go'
- '.github/workflows/integration.yml'
jobs:
integration:
name: Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Configure Git
run: |
git config --global user.name "CI Bot"
git config --global user.email "ci@gastown.test"
- name: Install beads (bd)
# Pin to v0.47.1 - v0.47.2 has routing defaults that cause prefix mismatch errors
run: go install github.com/steveyegge/beads/cmd/bd@v0.47.1
- name: Add to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Generate embedded files
run: go generate ./internal/formula/...
- name: Build
run: go build -v ./cmd/gt
- name: Run integration tests
run: go test -v -tags=integration -timeout=4m ./internal/cmd/...