Skip to content

Commit 9f6fae4

Browse files
committed
fix: put web action in a correct place
1 parent 0fd782e commit 9f6fae4

6 files changed

Lines changed: 47 additions & 13 deletions

File tree

actions/web/index.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"use strict";
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: React Native Harness for Web
2+
description: Run React Native Harness tests on Web
3+
inputs:
4+
runner:
5+
description: The runner to use
6+
required: true
7+
type: string
8+
projectRoot:
9+
description: The project root directory
10+
required: false
11+
type: string
12+
uploadVisualTestArtifacts:
13+
description: Whether to upload visual test diff and actual images as artifacts
14+
required: false
15+
type: boolean
16+
default: 'true'
17+
runs:
18+
using: 'composite'
19+
steps:
20+
- name: Load React Native Harness configuration
21+
id: load-config
22+
shell: bash
23+
env:
24+
INPUT_RUNNER: ${{ inputs.runner }}
25+
INPUT_PROJECTROOT: ${{ inputs.projectRoot }}
26+
run: |
27+
node ${{ github.action_path }}/../shared/index.cjs
28+
- name: Install Playwright Browsers
29+
shell: bash
30+
run: npx playwright install --with-deps chromium
31+
- name: Run E2E tests
32+
shell: bash
33+
working-directory: ${{ inputs.projectRoot }}
34+
run: |
35+
pnpm react-native-harness --harnessRunner ${{ inputs.runner }}
36+
- name: Upload visual test artifacts
37+
if: always() && inputs.uploadVisualTestArtifacts == 'true'
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: visual-test-diffs-chromium
41+
path: |
42+
${{ inputs.projectRoot }}/**/__image_snapshots__/**/*-diff.png
43+
${{ inputs.projectRoot }}/**/__image_snapshots__/**/*-actual.png
44+
if-no-files-found: ignore
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This file is intentionally empty.

packages/github-action/tsup.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from 'node:fs';
33
import path from 'node:path';
44

55
const OUT_DIR = path.resolve('../../actions');
6-
const TARGETS = ['ios', 'android'];
6+
const TARGETS = ['ios', 'android', 'web'];
77

88
const packageJson = JSON.parse(
99
fs.readFileSync(path.resolve('./package.json'), 'utf8')

packages/platform-web/tsconfig.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
"files": [],
44
"include": [],
55
"references": [
6-
{
7-
"path": "../config"
8-
},
9-
{
10-
"path": "../tools"
11-
},
126
{
137
"path": "../platforms"
148
},

packages/platform-web/tsconfig.lib.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
},
1313
"include": ["src/**/*.ts"],
1414
"references": [
15-
{
16-
"path": "../config/tsconfig.lib.json"
17-
},
18-
{
19-
"path": "../tools/tsconfig.lib.json"
20-
},
2115
{
2216
"path": "../platforms/tsconfig.lib.json"
2317
}

0 commit comments

Comments
 (0)