Skip to content

Commit 1c504d2

Browse files
authored
Merge pull request #8 from henry701/web-audit-dev
fix(app): sync upstream and harden development web session state
2 parents 7a06d4a + 4c66b4d commit 1c504d2

98 files changed

Lines changed: 3103 additions & 476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/setup-bun/action.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: "Setup Bun"
22
description: "Setup Bun with caching and install dependencies"
33
inputs:
4+
node-version:
5+
description: "Node.js version used by dependency install scripts"
6+
required: false
7+
default: "24"
48
install-flags:
59
description: "Additional flags to pass to 'bun install'"
610
required: false
@@ -13,7 +17,7 @@ runs:
1317
- name: Setup Node
1418
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
1519
with:
16-
node-version: "24"
20+
node-version: ${{ inputs.node-version }}
1721

1822
- name: Get baseline download URL
1923
id: bun-url

‎.github/workflows/test.yml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- dev
7+
- production
78
pull_request:
89
workflow_dispatch:
910

@@ -31,7 +32,7 @@ jobs:
3132
host: blacksmith-4vcpu-ubuntu-2404
3233
- name: windows
3334
host: blacksmith-4vcpu-windows-2025
34-
runs-on: ${{ matrix.settings.host }}
35+
runs-on: ${{ github.repository == 'anomalyco/opencode' && matrix.settings.host || (matrix.settings.name == 'windows' && 'windows-latest' || 'ubuntu-latest') }}
3536
defaults:
3637
run:
3738
shell: bash
@@ -54,6 +55,10 @@ jobs:
5455
git config --global user.email "bot@opencode.ai"
5556
git config --global user.name "opencode"
5657
58+
- name: Install ripgrep
59+
if: runner.os == 'Windows'
60+
run: choco install ripgrep --version 15.1.0 --yes --no-progress
61+
5762
- name: Cache Turbo
5863
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5964
with:
@@ -65,7 +70,7 @@ jobs:
6570
6671
- name: Run unit tests
6772
timeout-minutes: 20
68-
run: GITHUB_ACTIONS=false bun turbo test
73+
run: GITHUB_ACTIONS=false bun turbo test --concurrency=${{ github.repository == 'anomalyco/opencode' && '10' || '2' }}
6974
env:
7075
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
7176

@@ -89,9 +94,10 @@ jobs:
8994
host: blacksmith-4vcpu-ubuntu-2404
9095
- name: windows
9196
host: blacksmith-4vcpu-windows-2025
92-
runs-on: ${{ matrix.settings.host }}
97+
runs-on: ${{ github.repository == 'anomalyco/opencode' && matrix.settings.host || (matrix.settings.name == 'windows' && 'windows-latest' || 'ubuntu-latest') }}
9398
env:
9499
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers
100+
PLAYWRIGHT_WORKERS: ${{ github.repository == 'anomalyco/opencode' && '5' || '2' }}
95101
defaults:
96102
run:
97103
shell: bash
@@ -101,15 +107,12 @@ jobs:
101107
with:
102108
token: ${{ secrets.GITHUB_TOKEN }}
103109

104-
- name: Setup Node
105-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
110+
- name: Setup Bun
111+
uses: ./.github/actions/setup-bun
106112
with:
107113
# Playwright 1.59 hangs while extracting Chromium with Node 24.16.
108114
node-version: "24.15"
109115

110-
- name: Setup Bun
111-
uses: ./.github/actions/setup-bun
112-
113116
- name: Read Playwright version
114117
id: playwright-version
115118
run: |

‎.github/workflows/typecheck.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: typecheck
22

33
on:
44
push:
5-
branches: [dev]
5+
branches: [dev, production]
66
pull_request:
7-
branches: [dev]
7+
branches: [dev, production]
88
workflow_dispatch:
99

1010
jobs:
1111
typecheck:
12-
runs-on: blacksmith-4vcpu-ubuntu-2404
12+
runs-on: ${{ github.repository == 'anomalyco/opencode' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -18,4 +18,8 @@ jobs:
1818
uses: ./.github/actions/setup-bun
1919

2020
- name: Run typecheck
21-
run: bun typecheck
21+
run: bun typecheck --concurrency=${{ github.repository == 'anomalyco/opencode' && '10' || '2' }}
22+
23+
- name: Typecheck browser regression fixtures
24+
working-directory: packages/app
25+
run: bun run typecheck:e2e

‎.github/workflows/upstream-sync.yml‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Sync Upstream
22

33
on:
44
schedule:
5-
- cron: '0 6 * * *'
5+
- cron: "0 6 * * *"
66
workflow_dispatch:
77
inputs:
88
force:
9-
description: 'Force merge even if already up-to-date'
9+
description: "Force merge even if already up-to-date"
1010
type: boolean
1111
default: false
1212

@@ -91,6 +91,32 @@ jobs:
9191
} >> "$GITHUB_OUTPUT"
9292
fi
9393
94+
# GITHUB_TOKEN pushes do not trigger the normal push workflows. Gate here.
95+
- name: Setup validation tools
96+
if: steps.merge.outputs.status == 'merged'
97+
uses: ./.github/actions/setup-bun
98+
99+
- name: Validate merged types and unit tests
100+
if: steps.merge.outputs.status == 'merged'
101+
run: |
102+
bun turbo typecheck --concurrency=2
103+
bun --cwd packages/app run typecheck:e2e
104+
GITHUB_ACTIONS=false bun turbo test --concurrency=2
105+
bun --cwd packages/client run check:generated
106+
bun --cwd packages/opencode run test:httpapi
107+
108+
- name: Install browser test dependencies
109+
if: steps.merge.outputs.status == 'merged'
110+
working-directory: packages/app
111+
run: bunx playwright install --with-deps chromium firefox
112+
113+
- name: Validate merged browser behavior
114+
if: steps.merge.outputs.status == 'merged'
115+
working-directory: packages/app
116+
env:
117+
CI: true
118+
run: bun run test:e2e:local
119+
94120
- name: Push merged changes
95121
if: steps.merge.outputs.status == 'merged'
96122
shell: bash

0 commit comments

Comments
 (0)