Skip to content

Added example jspsych study and integration guide #23

Added example jspsych study and integration guide

Added example jspsych study and integration guide #23

Workflow file for this run

# Electron playtest smoke test
#
# Launches the dev-build Electron app with REMOTE_DEBUGGING_PORT, attaches
# CDP to the renderer page, and runs assertions:
# - window.electronAPI present (preload injection)
# - React root in DOM
# - Pyodide worker signals ready
# - No console errors
# - Screenshot captured
#
# macOS has a display by default. Linux needs xvfb-run.
# Windows: Electron CDP attach is unreliable on CI; renderer tests in
# test.yml already cover that platform.
name: Electron Playtest
on:
push:
branches:
- '**'
pull_request:
jobs:
playtest:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
# The postinstall step in npm ci installs Pyodide/MNE packages
# which are needed by the renderer. Verify they arrived.
- name: Verify Pyodide assets
run: |
ls src/renderer/utils/webworker/src/pyodide/pyodide.asm.wasm && echo "Pyodide OK"
ls src/renderer/utils/webworker/src/packages/manifest.json && echo "MNE packages OK"
- name: Run Electron smoke test
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
xvfb-run --auto-servernum node tests/electron-smoke.mjs
else
node tests/electron-smoke.mjs
fi
env:
SMOKE_TIMEOUT: '180'