-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathaction.yml
More file actions
44 lines (44 loc) · 1.4 KB
/
action.yml
File metadata and controls
44 lines (44 loc) · 1.4 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
name: React Native Harness for Web
description: Run React Native Harness tests on Web
inputs:
runner:
description: The runner to use
required: true
type: string
projectRoot:
description: The project root directory
required: false
type: string
uploadVisualTestArtifacts:
description: Whether to upload visual test diff and actual images as artifacts
required: false
type: boolean
default: 'true'
runs:
using: 'composite'
steps:
- name: Load React Native Harness configuration
id: load-config
shell: bash
env:
INPUT_RUNNER: ${{ inputs.runner }}
INPUT_PROJECTROOT: ${{ inputs.projectRoot }}
run: |
node ${{ github.action_path }}/../shared/index.cjs
- name: Install Playwright Browsers
shell: bash
run: npx playwright install --with-deps chromium
- name: Run E2E tests
shell: bash
working-directory: ${{ inputs.projectRoot }}
run: |
pnpm react-native-harness --harnessRunner ${{ inputs.runner }}
- name: Upload visual test artifacts
if: always() && inputs.uploadVisualTestArtifacts == 'true'
uses: actions/upload-artifact@v4
with:
name: visual-test-diffs-chromium
path: |
${{ inputs.projectRoot }}/**/__image_snapshots__/**/*-diff.png
${{ inputs.projectRoot }}/**/__image_snapshots__/**/*-actual.png
if-no-files-found: ignore