Skip to content

workflow(ci): fix ai test error (#113) #141

workflow(ci): fix ai test error (#113)

workflow(ci): fix ai test error (#113) #141

Workflow file for this run

name: AI test
on:
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18.19.0]
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
MIDSCENE_MODEL_NAME: ${{ secrets.MIDSCENE_MODEL_NAME }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: '18'
cache: 'pnpm'
- name: Cache Playwright dependencies
uses: actions/cache@v3
id: cache-playwright
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright dependencies
run: |
cd packages/web-integration
if [ "${{ steps.cache-playwright.outputs.cache-hit }}" != "true" ]; then
npx playwright install --with-deps
else
npx playwright install-deps && npx playwright install
fi
- name: Build project
run: pnpm run build
- name: Run e2e tests
run: pnpm run e2e
- name: Run e2e tests cache
run: pnpm run e2e:cache
- name: Run e2e tests report
run: pnpm run e2e:report
- name: Run tests
run: pnpm run test:ai