feat(polecat): add pool-init command and local branch cleanup in done #6040
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| # Guard: gastown no longer supports issues.jsonl — Dolt server is the only backend. | |
| check-no-issues-jsonl: | |
| name: Reject issues.jsonl | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Reject issues.jsonl if present | |
| run: | | |
| if [ -f .beads/issues.jsonl ]; then | |
| echo "ERROR: .beads/issues.jsonl must not exist in the repository." | |
| echo "" | |
| echo "Gastown requires a Dolt server — issues.jsonl is no longer supported." | |
| echo "" | |
| echo "To fix, run:" | |
| echo " git rm .beads/issues.jsonl" | |
| echo " git commit --amend" | |
| echo " git push --force" | |
| echo "" | |
| exit 1 | |
| fi | |
| echo "OK: no issues.jsonl found" | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6 | |
| with: | |
| go-version: '1.26' | |
| cache: true | |
| - name: Install ICU4C development headers | |
| run: sudo apt-get install -y libicu-dev | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "CI Bot" | |
| git config --global user.email "ci@gastown.test" | |
| - name: Install Dolt | |
| run: | | |
| curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | sudo bash | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@latest | |
| - name: Build | |
| run: go build -v ./cmd/gt | |
| - name: Test with Coverage | |
| run: | | |
| set -o pipefail | |
| gotestsum --format testname --junitfile junit.xml -- -race -short -coverprofile=coverage.out ./... 2>&1 | tee test-output.txt | |
| - name: Test Report | |
| if: always() | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| python3 .github/scripts/junit-report.py junit.xml "Unit Test Failures" | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5 | |
| with: | |
| files: coverage.out | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5 | |
| with: | |
| files: junit.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| report_type: test_results | |
| fail_ci_if_error: false | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6 | |
| with: | |
| go-version: '1.26' | |
| cache: true | |
| - name: Install ICU4C development headers | |
| run: sudo apt-get install -y libicu-dev | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 | |
| with: | |
| version: v2.10.1 | |
| args: --timeout=5m | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6 | |
| with: | |
| go-version: '1.26' | |
| cache: true | |
| - name: Install ICU4C development headers | |
| run: sudo apt-get install -y libicu-dev | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "CI Bot" | |
| git config --global user.email "ci@gastown.test" | |
| - name: Install Dolt | |
| run: | | |
| curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | sudo bash | |
| - name: Cache beads (bd) | |
| id: cache-beads-int | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5 | |
| with: | |
| path: ~/go/bin/bd | |
| key: beads-${{ hashFiles('.github/workflows/ci.yml') }} | |
| - name: Install beads (bd) | |
| if: steps.cache-beads-int.outputs.cache-hit != 'true' | |
| run: go install github.com/steveyegge/beads/cmd/bd@v0.56.1 | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@latest | |
| - name: Build gt | |
| run: | | |
| make build | |
| cp gt $(go env GOPATH)/bin/ | |
| - name: Add to PATH | |
| run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Integration Tests | |
| run: gotestsum --format testname --junitfile junit-integration.xml -- -tags=integration -timeout=15m -v ./internal/cmd/... | |
| - name: Test Report | |
| if: always() | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| python3 .github/scripts/junit-report.py junit-integration.xml "Integration Test Failures" |