Skip to content

feat: add project intelligence workflows #2

feat: add project intelligence workflows

feat: add project intelligence workflows #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
syntax-and-bootstrap:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
args: "--force --skip-backup"
- os: macos-latest
args: "--force --skip-backup --skip-deps"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Shell syntax check
run: |
sh -n bootstrap.sh
sh -n scripts/verify.sh
sh -n scripts/generate-checksums.sh
- name: Verify bundle checksums are current
run: |
./scripts/generate-checksums.sh --check
- name: Bootstrap smoke test
run: |
chmod +x bootstrap.sh scripts/verify.sh scripts/generate-checksums.sh
./bootstrap.sh --target-dir "$RUNNER_TEMP/opencode-bootstrap-test" ${{ matrix.args }}
./scripts/verify.sh --target-dir "$RUNNER_TEMP/opencode-bootstrap-test"
- name: Custom tools smoke test
run: |
TARGET="$RUNNER_TEMP/opencode-bootstrap-test"
PORT=4110
cd "$TARGET"
OPENCODE_CONFIG="$TARGET/opencode.json" OPENCODE_CONFIG_DIR="$TARGET" opencode serve --port "$PORT" >/tmp/opencode-bootstrap-serve.log 2>&1 &
SERVER_PID=$!
sleep 5
curl --noproxy '*' -fsS "http://127.0.0.1:${PORT}/experimental/tool/ids" | tee /tmp/opencode-bootstrap-tool-ids.json
kill "$SERVER_PID"
wait "$SERVER_PID" 2>/dev/null || true
grep -q 'project_intelligence_status' /tmp/opencode-bootstrap-tool-ids.json
grep -q 'project_intelligence_apply' /tmp/opencode-bootstrap-tool-ids.json
grep -q 'loop_state_start' /tmp/opencode-bootstrap-tool-ids.json
grep -q 'loop_state_status' /tmp/opencode-bootstrap-tool-ids.json
- name: Dry run smoke test
run: |
./bootstrap.sh --dry-run --target-dir "$RUNNER_TEMP/opencode-bootstrap-dry-run"