Repository navigation
530 lines (484 loc) · 23.7 KB
/
Copy pathpr-build.yml
File metadata and controls
530 lines (484 loc) · 23.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
name: PR Build Validation
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review
permissions:
contents: read
actions: write
concurrency:
group: pr-build-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
authorize:
runs-on: ubuntu-latest
outputs:
allowed: ${{ steps.auth.outputs.allowed }}
env:
ALLOWED_ACTORS: ${{ vars.ALLOWED_NON_DEV_PR_ACTORS }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
steps:
- name: Check PR authorization
id: auth
shell: bash
run: |
set -euo pipefail
if [ "$BASE_REF" = "dev" ] || [ "$BASE_REF" = "DEV-v2" ]; then
echo "allowed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
normalized=",${ALLOWED_ACTORS},"
if [[ "$normalized" == *",${PR_AUTHOR},"* ]]; then
echo "allowed=true" >> "$GITHUB_OUTPUT"
else
echo "allowed=false" >> "$GITHUB_OUTPUT"
echo "Skipping builds for PR by unauthorized author targeting $BASE_REF" >&2
fi
build:
needs:
- authorize
- tests
- tests-tauri-windows
- tests-opencode-compatibility
- tests-session-pruning-native
- tests-runtime-contracts
- tests-tauri-macos
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
uses: ./.github/workflows/build-and-upload.yml
with:
ref: ${{ github.event.pull_request.head.sha }}
upload: false
upload_actions_artifacts: true
actions_artifacts_retention_days: 7
actions_artifacts_name_prefix: pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-
set_versions: false
tests-session-pruning-native:
needs: authorize
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci --ignore-scripts
- name: Install browser for native pruning UI checks
run: npx --workspace @codenomad/ui playwright install --with-deps chromium
- name: Pack and install outside the checkout
shell: pwsh
run: |
$sandbox = Join-Path $env:RUNNER_TEMP 'pruning-native-install'
New-Item -ItemType Directory -Force $sandbox | Out-Null
$package = npm pack ./packages/server/src/opencode/session-pruning --pack-destination $sandbox --json | ConvertFrom-Json
if ($LASTEXITCODE) { exit $LASTEXITCODE }
npm install --prefix $sandbox (Join-Path $sandbox $package.filename) '@opencode/cli@latest' --ignore-scripts --no-audit --no-fund
if ($LASTEXITCODE) { exit $LASTEXITCODE }
"PRUNING_NATIVE_INSTALL=$sandbox" >> $env:GITHUB_ENV
- name: Test the installed plugin with an isolated official runtime
shell: pwsh
run: |
$platform = node -p "process.platform === 'win32' ? 'windows' : process.platform"
$arch = node -p "process.arch"
$extension = node -p "process.platform === 'win32' ? '.exe' : ''"
$cli = Join-Path $env:PRUNING_NATIVE_INSTALL "node_modules/@opencode/cli-$platform-$arch/bin/opencode$extension"
& $cli --version
if ($LASTEXITCODE) { exit $LASTEXITCODE }
$plugin = Join-Path $env:PRUNING_NATIVE_INSTALL 'node_modules/@neuralnomads/codenomad-session-pruning'
$fixtures = node -p "require('node:path').join(require('node:fs').realpathSync(require('node:os').tmpdir()), 'opencode')"
"PRUNING_NATIVE_FIXTURES=$fixtures" >> $env:GITHUB_ENV
node scripts/test-session-pruning-native.mjs $cli $plugin
if ($LASTEXITCODE) { exit $LASTEXITCODE }
npm run build:pruning --workspace @neuralnomads/codenomad
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node --import tsx --test packages/server/src/opencode/pruning-installation.test.ts
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node scripts/test-session-pruning-native.mjs $cli --ui
- name: Upload isolated native failure diagnostics
if: ${{ failure() && env.PRUNING_NATIVE_FIXTURES != '' }}
uses: actions/upload-artifact@v4
with:
name: session-pruning-failure-${{ matrix.os }}
path: |
${{ env.PRUNING_NATIVE_FIXTURES }}/codenomad-pruning-native-*/server.log
${{ env.PRUNING_NATIVE_FIXTURES }}/codenomad-pruning-native-*/before-restart.log
${{ env.PRUNING_NATIVE_FIXTURES }}/codenomad-pruning-native-*/discovery.json
${{ env.PRUNING_NATIVE_FIXTURES }}/codenomad-pruning-native-*/ui-*.png
if-no-files-found: ignore
retention-days: 7
- name: Upload opt-in plugin package
if: success()
uses: actions/upload-artifact@v4
with:
name: session-pruning-plugin-${{ matrix.os }}
path: ${{ runner.temp }}/pruning-native-install/*.tgz
if-no-files-found: error
retention-days: 7
tests-runtime-contracts:
needs: authorize
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
runtime: [minimum, latest]
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci --ignore-scripts
- run: npm run build:pruning --workspace @neuralnomads/codenomad
- run: npm run build:automation --workspace @neuralnomads/codenomad
- name: Qualify the pinned client against the technical minimum and latest stable
shell: pwsh
run: |
$sandbox = Join-Path $env:RUNNER_TEMP 'opencode-contract-runtime'
$version = '${{ matrix.runtime }}'
if ($version -eq 'minimum') {
$version = node --import tsx --input-type=module -e "import { MINIMUM_OPENCODE_VERSION } from './packages/server/src/opencode/runtime-support.ts'; console.log(MINIMUM_OPENCODE_VERSION)"
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}
npm install --prefix $sandbox "@opencode/cli@$version" --ignore-scripts --no-audit --no-fund
if ($LASTEXITCODE) { exit $LASTEXITCODE }
$cli = Join-Path $sandbox 'node_modules/@opencode/cli-windows-x64/bin/opencode.exe'
& $cli --version
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node scripts/test-automation-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node scripts/test-session-pruning-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node scripts/test-session-environment-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node scripts/test-session-fork-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node scripts/test-session-aside-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
node --conditions=browser --import tsx scripts/test-blank-session-cleanup-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
tests:
needs: authorize
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Linux test dependencies (Tauri)
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
zsh \
xvfb \
pkg-config \
libgtk-3-dev \
libglib2.0-dev \
libwebkit2gtk-4.1-dev \
libsoup-3.0-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install dependencies
run: npm ci
- name: Typecheck desktop clients
run: npm run typecheck
- name: Build bundled automation integration
run: npm run build:automation --workspace @neuralnomads/codenomad
- name: Test desktop packaging invariants
run: node --test scripts/desktop-server-resources.test.cjs scripts/prepare-node-runtime.test.cjs
- name: Test Electron client state
env:
CODENOMAD_TEST_ZSH: /bin/zsh
run: |
npm run test:native --workspace @neuralnomads/codenomad-electron-app
node --import tsx --test packages/electron-app/electron/main/view-menu.test.ts
- name: Test changed runnable UI behavior
run: >-
node --import tsx --test --test-force-exit
packages/ui/src/components/browser-frame-security.test.ts
packages/ui/src/components/message-history-pagination.test.ts
packages/ui/src/components/message-timeline-v2.test.ts
packages/ui/src/components/session-outline-projection.test.ts
packages/ui/src/components/provider-auth/provider-options.test.ts
packages/ui/src/components/prompt-input/device-file-selection.test.ts
packages/ui/src/components/prompt-input/height-state.test.ts
packages/ui/src/components/session/session-bottom-pin-intent.test.ts
packages/ui/src/components/session/session-idle-attention.test.ts
packages/ui/src/components/session-list-visibility.test.ts
packages/ui/src/components/tool-call/permission-block.test.ts
packages/ui/src/components/tool-call/render-memory.test.ts
packages/ui/src/components/settings/info-settings-diagnostics.test.ts
packages/ui/src/components/tool-call/tool-presentation.test.ts
packages/ui/src/components/transcript-visibility.test.ts
packages/ui/src/components/unified-picker-path.test.ts
packages/ui/src/components/virtual-follow-behavior.test.ts
packages/ui/src/components/virtual-follow-measurements.test.ts
packages/ui/src/components/virtual-reader-settlement.test.ts
packages/ui/src/lib/client-identity.test.ts
packages/ui/src/lib/filesystem-events.test.ts
packages/ui/src/lib/global-cache.test.ts
packages/ui/src/lib/hooks/use-app-session-capture.test.ts
packages/ui/src/lib/hooks/use-instance-metadata.test.ts
packages/ui/src/lib/hooks/use-foreground-refresh.test.ts
packages/ui/src/lib/hooks/use-electron-folder-launch.test.ts
packages/ui/src/lib/launch-errors.test.ts
packages/ui/src/lib/clipboard.test.ts
packages/ui/src/lib/message-selection-position.test.ts
packages/ui/src/lib/model-visibility.test.ts
packages/ui/src/lib/retained-size.test.ts
packages/ui/src/lib/provider-auth.test.ts
packages/ui/src/lib/native/browser.test.ts
packages/ui/src/lib/runtime-env.test.ts
packages/ui/src/lib/session-transcript-lru.test.ts
packages/ui/src/lib/server-meta.test.ts
packages/ui/src/lib/theme-scheme.test.ts
packages/ui/src/lib/trailing-resync.test.ts
packages/ui/src/stores/abort-created-workspace-cleanup.test.ts
packages/ui/src/stores/app-session-reconciliation.test.ts
packages/ui/src/stores/app-session-restore-queue.test.ts
packages/ui/src/stores/app-session-restore-timeout.test.ts
packages/ui/src/stores/app-session-snapshot-merge.test.ts
packages/ui/src/stores/restore-workspace-commit-gates.test.ts
packages/ui/src/stores/client-state-codec.test.ts
packages/ui/src/stores/client-state-partitions.test.ts
packages/ui/src/stores/client-state.test.ts
packages/ui/src/stores/form-settlements.test.ts
packages/ui/src/stores/instance-invalidation.test.ts
packages/ui/src/stores/plugin-controls.test.ts
packages/ui/src/stores/plugin-controls-demand.test.ts
packages/ui/src/stores/plugin-controls-events.test.ts
packages/ui/src/stores/message-prompt-display.test.ts
packages/ui/src/stores/message-v2/instance-store.test.ts
packages/ui/src/stores/message-v2/message-hydration-authority.test.ts
packages/ui/src/stores/message-v2/message-status.test.ts
packages/ui/src/stores/message-v2/message-window.test.ts
packages/ui/src/stores/message-v2/normalizers.test.ts
packages/ui/src/stores/request-locations.test.ts
packages/ui/src/stores/shell-store.test.ts
packages/ui/src/stores/session-generation-recovery.test.ts
packages/ui/src/stores/session-outline-persistence.test.ts
packages/ui/src/stores/session-pagination.test.ts
packages/ui/src/stores/session-fork.test.ts
packages/ui/src/stores/workspace-session-scope.test.ts
packages/ui/src/stores/session-pending-state.test.ts
packages/ui/src/stores/session-tree.test.ts
packages/ui/src/stores/session-previews.test.ts
packages/ui/src/stores/workspace-load-readiness.test.ts
packages/ui/src/types/session.test.ts
packages/ui/src/stores/workspace-list-reconciliation-fence.test.ts
- name: Test restore ownership integration
run: >-
node --conditions=browser --import tsx --test --test-force-exit
packages/ui/src/components/form-request-tool-target.test.ts
packages/ui/src/components/form-request.test.ts
packages/ui/src/components/instance/shell/useSessionCache.test.ts
packages/ui/src/components/permission-diff-review.test.ts
packages/ui/src/components/tool-call/renderers/task-copy.test.ts
packages/ui/src/components/tool-call/renderer-copy.test.ts
packages/ui/src/components/tool-call/diff-payload.test.ts
packages/ui/src/components/tool-call/renderers/edit.test.ts
packages/ui/src/components/tool-call/renderers/task-title.test.ts
packages/ui/src/components/prompt-input/usePromptState.test.ts
packages/ui/src/components/session/provider-usage-panel.test.ts
packages/ui/src/lib/hooks/use-active-session-message-load.test.ts
packages/ui/src/lib/sdk-manager.test.ts
packages/ui/src/lib/background-read-queue.test.ts
packages/ui/src/lib/prioritized-read.test.ts
packages/ui/src/stores/instance-startup-priority.test.ts
packages/ui/src/stores/session-list-startup.test.ts
packages/ui/src/stores/app-tabs.test.ts
packages/ui/src/stores/forms.test.ts
packages/ui/src/stores/preferences-favorites-mode.test.ts
packages/ui/src/stores/instances-restore-ownership.test.ts
packages/ui/src/stores/message-v2/bus.test.ts
packages/ui/src/stores/message-v2/transcript-eviction.test.ts
packages/ui/src/stores/opencode-data.test.ts
packages/ui/src/stores/opencode-data-idle.test.ts
packages/ui/src/stores/opencode-data-settlement.test.ts
packages/ui/src/stores/message-v2/empty-content.test.ts
packages/ui/src/stores/permission-lifecycle.test.ts
packages/ui/src/stores/shell-store-reactivity.test.ts
packages/ui/src/stores/session-actions.test.ts
packages/ui/src/stores/session-model-reconciliation.test.ts
packages/ui/src/stores/session-pruning-events.test.ts
packages/ui/src/stores/session-pruning-projection.test.ts
packages/ui/src/stores/session-pruning-pagination.test.ts
packages/ui/src/stores/session-native-events.test.ts
packages/ui/src/stores/session-outline.test.ts
packages/ui/src/stores/runtime-contract.test.ts
packages/ui/src/stores/session-usage-contract.test.ts
packages/ui/src/stores/session-move-restore.test.ts
packages/ui/src/stores/session-request-authority.test.ts
packages/ui/src/stores/session-git-degraded.test.ts
packages/ui/src/stores/session-send-lifecycle.test.ts
packages/ui/src/stores/blank-session-cleanup.test.ts
packages/ui/src/stores/session-status.test.ts
packages/ui/src/stores/worktree-ready.test.ts
packages/ui/src/stores/worktrees-delete.test.ts
- name: Test server
run: node --import tsx --test "packages/server/src/**/*.test.ts"
- name: Install Chromium for UI rendering regressions
run: npx playwright install --with-deps chromium
- name: Test browser transcript rendering and navigation
run: xvfb-run -a npm run test:browser --workspace @codenomad/ui
- name: Prepare Tauri test resources
run: >-
npm run dev:prep --workspace @codenomad/tauri-app &&
node -e "require('fs').mkdirSync('packages/tauri-app/src-tauri/resources/server',{recursive:true})"
- name: Test Tauri crate
working-directory: packages/tauri-app/src-tauri
run: CODENOMAD_TEST_ZSH=/bin/zsh CODENOMAD_TEST_NODE="$(command -v node)" cargo test --locked
tests-tauri-windows:
needs: authorize
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: npm ci
- name: Test Windows server spawn behavior
run: node --import tsx --test packages/server/src/workspaces/__tests__/spawn.test.ts
- name: Prepare Tauri test resources
run: >-
npm run dev:prep --workspace @codenomad/tauri-app &&
node -e "require('fs').mkdirSync('packages/tauri-app/src-tauri/resources/server',{recursive:true})"
- name: Test Tauri crate on Windows
working-directory: packages/tauri-app/src-tauri
run: cargo test --locked -- --test-threads=1
- name: Reproduce and prevent Tao input deadlocks
run: node scripts/test-tauri-input-deadlock.mjs --baseline
# Exercise the selected-CLI contract on the reported macOS ARM64 platform as
# well as both other hosts, independently of unrelated server-suite failures.
tests-opencode-compatibility:
needs: authorize
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-26]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install dependencies
run: npm ci
- name: Test binary compatibility and shared lifecycle
run: >-
node --import tsx --test
packages/server/src/workspaces/__tests__/spawn.test.ts
packages/server/src/workspaces/__tests__/binary-probe.test.ts
packages/server/src/workspaces/session-environment.test.ts
packages/server/src/workspaces/git-requirement.test.ts
packages/server/src/server/__tests__/session-environment.test.ts
"packages/server/src/workspaces/*opencode*.test.ts"
packages/server/src/server/routes/binary-validation.test.ts
"packages/server/src/opencode-update/*.test.ts"
packages/ui/src/lib/launch-errors.test.ts
- name: Test first installation without system Node
timeout-minutes: 10
run: node scripts/test-opencode-install-native.mjs
- name: Test migration failure guards
run: node --test scripts/native-fixture-guards.test.mjs "scripts/fixtures/wsl-*.test.mjs"
- name: Certify native migration and Git-degraded conversations at the minimum and latest stable
timeout-minutes: 20
shell: pwsh
run: |
$platform = node -p "process.platform === 'win32' ? 'windows' : process.platform"
$arch = node -p "process.arch"
$extension = node -p "process.platform === 'win32' ? '.exe' : ''"
$seeds = @(
@{ scope = '@opencode'; version = '2.0.3'; command = 'opencode' },
@{ scope = '@opencode-ai'; version = '0.0.0-beta-19271'; command = 'opencode2' }
)
$oldClis = foreach ($entry in $seeds) {
$seed = Join-Path $env:RUNNER_TEMP "opencode-migration-seed-$($entry.version)"
npm install --prefix $seed "$($entry.scope)/cli@$($entry.version)" --ignore-scripts --no-audit --no-fund | Out-Host
if ($LASTEXITCODE) { exit $LASTEXITCODE }
Join-Path $seed "node_modules/$($entry.scope)/cli-$platform-$arch/bin/$($entry.command)$extension"
}
$minimum = node --import tsx --input-type=module -e "import { MINIMUM_OPENCODE_VERSION } from './packages/server/src/opencode/runtime-support.ts'; console.log(MINIMUM_OPENCODE_VERSION)"
if ($LASTEXITCODE) { exit $LASTEXITCODE }
foreach ($version in @($minimum, 'latest')) {
$target = Join-Path $env:RUNNER_TEMP "opencode-migration-$version"
npm install --prefix $target "@opencode/cli@$version" --ignore-scripts --no-audit --no-fund
if ($LASTEXITCODE) { exit $LASTEXITCODE }
$cli = Join-Path $target "node_modules/@opencode/cli-$platform-$arch/bin/opencode$extension"
foreach ($oldCli in $oldClis) {
node scripts/test-opencode-history-migration.mjs $oldCli $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}
node scripts/test-git-degraded-native.mjs $cli
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}
# Exercise the window persistence regressions on the architecture reported in
# #676, independently of the Linux server gate. Packaging alone cannot test them.
tests-tauri-macos:
needs: authorize
if: ${{ needs.authorize.outputs.allowed == 'true' && !github.event.pull_request.draft }}
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: npm ci
- name: Prepare Tauri test resources
run: >-
npm run dev:prep --workspace @codenomad/tauri-app &&
node -e "require('fs').mkdirSync('packages/tauri-app/src-tauri/resources/server',{recursive:true})"
- name: Test Tauri crate on macOS ARM64
working-directory: packages/tauri-app/src-tauri
run: CODENOMAD_TEST_ZSH=/bin/zsh CODENOMAD_TEST_NODE="$(command -v node)" cargo test --locked -- --test-threads=4
- name: Test desktop shell startup on macOS
env:
CODENOMAD_TEST_ZSH: /bin/zsh
run: node --import tsx --test packages/electron-app/electron/main/user-shell.test.ts