Files
opencode-manager/.github/workflows/ci.yml
T
Chris Scott a9220e8604 chore(opencode): move the OpenCode pin to 2.2.3 and ocm-cli to OpenTUI 0.8 (OM-169)
OpenCode 2.2.3 requires TUI plugins built for OpenTUI 0.8. Move the single
OpenCode pin, the typed client and schema, the Docker default and the CI
download to 2.2.3, so the supported range becomes >=2.2.3 <3.0.0, and
regenerate the theme palettes from the v2.2.3 tag.

Move ocm-cli to @opencode/plugin and @opencode/theme 2.2.3 and OpenTUI 0.8.0,
raise the solid-js dev pin and peer floor to 1.9.16, and teach the
package-compat test to read the floor of a range peer, keeping a patch-level
0.x floor and normalizing prefixed versions.

Guard the CI workflow's download against the pin in the contract test, take
the binary test fixture from the pin, and document the ocm 0.5.x requirement
of a local OpenCode >= 2.2.3.
2026-10-30 21:33:54 -04:00

149 lines
3.6 KiB
YAML

name: CI
on:
pull_request:
branches: [main, dev]
types: [labeled]
pull_request_review:
types: [submitted]
jobs:
check-ready:
name: Check if Ready for CI
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.check.outputs.run }}
steps:
- name: Check trigger conditions
id: check
run: |
if [[ "${{ github.event_name }}" == "pull_request_review" && "${{ github.event.review.state }}" == "approved" ]]; then
echo "Triggered by PR approval"
echo "run=true" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.label.name }}" == "ready-for-ci" ]]; then
echo "Triggered by ready-for-ci label"
echo "run=true" >> $GITHUB_OUTPUT
else
echo "Conditions not met, skipping CI"
echo "run=false" >> $GITHUB_OUTPUT
fi
lint:
name: Lint
needs: check-ready
if: needs.check-ready.outputs.should-run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.28.1
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run linter
run: pnpm lint
typecheck:
name: Type Check
needs: check-ready
if: needs.check-ready.outputs.should-run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.28.1
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run type check
run: pnpm typecheck
test:
name: Test
needs: check-ready
if: needs.check-ready.outputs.should-run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: pnpm/action-setup@v4
with:
version: 10.28.1
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test
e2e:
name: E2E
needs: check-ready
if: needs.check-ready.outputs.should-run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: pnpm/action-setup@v4
with:
version: 10.28.1
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install OpenCode CLI
run: |
source scripts/lib/opencode-release.sh
download_opencode_to 2.2.3 "$RUNNER_TEMP/opencode/bin/opencode"
echo "$RUNNER_TEMP/opencode/bin" >> "$GITHUB_PATH"
- name: Verify OpenCode CLI
run: opencode --version
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
- name: Run end-to-end tests
run: pnpm test:e2e
- name: Upload Playwright artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-artifacts
path: |
playwright-report/
test-results/
retention-days: 7