fix: debug workflow of playwright (#20) #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright Demo | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'The tag name of @midscene/' | |
required: true | |
default: 'beta' | |
push: | |
branches: | |
- main | |
env: | |
TAG: ${{ github.event.inputs.tag || 'beta' }} | |
jobs: | |
run_script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Run script | |
id: run-script | |
env: | |
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: | | |
cd playwright-demo | |
npm i pnpm -g | |
pnpm install --no-frozen-lockfile | |
pnpm i @midscene/web@${{ env.TAG }} --save-dev | |
pnpm run e2e | |
continue-on-error: true | |
- name: Upload output folder | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: Midscene Report | |
path: ${{ github.workspace }}/playwright-demo/midscene_run/report | |
- name: Check if script failed | |
if: steps.run-script.outcome == 'failure' | |
run: exit 1 |