Files
openwork/.github/workflows/ci-tests.yml
ben 86938ece00 fix(headless): align openwrk TUI compile path with OpenTUI + branch CI (#536)
* fix(headless): align openwrk compile path with OpenTUI Solid

Use the upstream @opentui/solid build plugin and preload/tsconfig wiring so compiled openwrk binaries keep TUI runtime compatibility instead of emitting broken React runtime behavior.

* ci: run openwrk checks on feature branch pushes

Trigger CI for fix/openwrk-react-shim and add an openwrk binary build job so bundling regressions are caught before merging to dev.

* ci: relax binary validation to runtime smoke

Use openwrk --version/--help checks instead of grepping embedded strings so the branch CI validates bundling without false failures from defensive error text.

* fix(desktop): build openwrk sidecar via headless build script

Route desktop sidecar preparation through packages/headless/script/build.ts so OpenTUI plugin settings are applied consistently and Linux CI no longer compiles openwrk with incompatible JSX defaults.
2026-02-10 23:39:38 -08:00

82 lines
2.1 KiB
YAML

name: OpenWork Tests
on:
pull_request:
branches:
- dev
push:
branches:
- dev
- fix/openwrk-react-shim
permissions:
contents: read
jobs:
openwork-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0
- name: Install OpenCode CLI
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
version="${OPENCODE_VERSION:-}"
if [ -z "$version" ] || [ "$version" = "latest" ]; then
latest=""
if [ -n "${GITHUB_TOKEN:-}" ]; then
latest=$(curl -fsSL \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/anomalyco/opencode/releases/latest \
| sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')
else
latest=$(curl -fsSL \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/anomalyco/opencode/releases/latest \
| sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')
fi
if [ -n "$latest" ]; then
version="$latest"
fi
fi
if [ -z "$version" ]; then
echo "Unable to resolve OpenCode version (set OPENCODE_VERSION to pin)." >&2
exit 1
fi
curl -fsSL https://opencode.ai/install | bash -s -- --version "$version"
echo "$HOME/.opencode/bin" >> "$GITHUB_PATH"
- name: Verify OpenCode
run: opencode --version
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run e2e tests
run: pnpm --filter @different-ai/openwork test:e2e