-
-
Notifications
You must be signed in to change notification settings - Fork 339
76 lines (68 loc) · 2.06 KB
/
Copy pathharness-web.yml
File metadata and controls
76 lines (68 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Harness Web
on:
workflow_dispatch:
inputs:
proxy_port:
description: "Local port for the same-origin proxy in front of harness Metro"
required: false
default: "3000"
type: string
push:
branches:
- main
paths:
- ".github/workflows/harness-web.yml"
- "packages/react-native-mmkv/src/**"
- "packages/react-native-mmkv/lib/**"
- "**/bun.lock"
- "**/react-native.config.js"
- "**/nitro.json"
- "example/__tests__/**"
- "example/rn-harness.config.mjs"
- "example/metro.config.js"
- "example/babel.config.js"
- "example/app.json"
- "example/index.js"
- "example/scripts/web-proxy.mjs"
pull_request:
paths:
- ".github/workflows/harness-web.yml"
- "packages/react-native-mmkv/src/**"
- "packages/react-native-mmkv/lib/**"
- "**/bun.lock"
- "**/react-native.config.js"
- "**/nitro.json"
- "example/__tests__/**"
- "example/rn-harness.config.mjs"
- "example/metro.config.js"
- "example/babel.config.js"
- "example/app.json"
- "example/index.js"
- "example/scripts/web-proxy.mjs"
env:
PROXY_PORT: ${{ github.event.inputs.proxy_port || '3000' }}
jobs:
harness_web:
name: Harness Web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
- name: Install npm dependencies (bun)
run: bun install
- name: Install Playwright browser
working-directory: example
run: bunx playwright install --with-deps chromium
- name: Start same-origin proxy
working-directory: example
run: |
PROXY_PORT=${{ env.PROXY_PORT }} bun run web:proxy &
echo "PROXY_PID=$!" >> $GITHUB_ENV
- name: Run Harness Web tests
working-directory: example
env:
HARNESS_WEB_URL: http://localhost:${{ env.PROXY_PORT }}
run: bun run test:harness --harnessRunner web
- name: Stop proxy
if: always()
run: kill $PROXY_PID || true