Skip to content

feat(cli): add TypeScript runner with AgentProxy for browser automation #1507

feat(cli): add TypeScript runner with AgentProxy for browser automation

feat(cli): add TypeScript runner with AgentProxy for browser automation #1507

Workflow file for this run

name: AI unit test
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
branch:
description: 'Branch to checkout'
required: false
default: 'main'
type: string
permissions:
contents: read
jobs:
main:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [24.13.0]
env:
MIDSCENE_MODEL_API_KEY: ${{ secrets.MIDSCENE_MODEL_API_KEY }}
MIDSCENE_MODEL_BASE_URL: ${{ vars.MIDSCENE_MODEL_BASE_URL }}
MIDSCENE_MODEL_NAME: ${{ vars.MIDSCENE_MODEL_NAME }}
MIDSCENE_MODEL_FAMILY: ${{ vars.MIDSCENE_MODEL_FAMILY }}
MIDSCENE_MODEL_RETRY_COUNT: "2"
MIDSCENE_MODEL_RETRY_INTERVAL: "60000"
MIDSCENE_REPORT_QUIET: "true"
# DEBUG: midscene:* # Disabled to prevent log overflow
CI: 1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9.3.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24.13.0'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install puppeteer dependencies
run: |
cd packages/web-integration
npx puppeteer browsers install chrome
- name: Run tests
run: pnpm run test:ai
id: test-ai
continue-on-error: true
- name: Upload test-ai output
if: always()
uses: actions/upload-artifact@v4
with:
name: test-ai-output
path: ${{ github.workspace }}/packages/web-integration/midscene_run/report
if-no-files-found: ignore
- name: Check if script failed
if: steps.test-ai.outcome == 'failure'
run: exit 1