Skip to content

Commit b74d7b3

Browse files
authored
feat: add github actions for playwright and puppeteer (#11)
* fix: debug workflow * fix: debug workflow * fix: debug workflow
1 parent b222384 commit b74d7b3

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

.github/workflows/playwright-demo.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Command Line Demo
1+
name: Playwright Demo
22

33
on:
44
workflow_dispatch:
@@ -21,8 +21,9 @@ jobs:
2121
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2222
run: |
2323
cd playwright-demo
24-
npm i
25-
npm run e2e
24+
npm i pnpm -g
25+
pnpm install
26+
pnpm run e2e
2627
2728
- name: Upload output folder
2829
uses: actions/upload-artifact@v4

.github/workflows/puppeteer-demo.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Puppeteer Demo
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
output_folder:
7+
description: 'Midscene report dir'
8+
required: true
9+
default: 'puppeteer-demo/midscene-run/report'
10+
11+
jobs:
12+
run_script:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Run script
19+
env:
20+
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
21+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
22+
run: |
23+
cd puppeteer-demo
24+
npm i pnpm -g
25+
pnpm install
26+
pnpm run test
27+
28+
- name: Upload output folder
29+
uses: actions/upload-artifact@v4
30+
with:
31+
if-no-files-found: error
32+
name: Midscene Report
33+
path: ${{ github.workspace }}/${{ github.event.inputs.output_folder }}

0 commit comments

Comments
 (0)