Skip to content

Commit b952440

Browse files
ci(github): add UMD page test to workflow test.yml
- Add `page-test-action` step to test the UMD example page - Start a local Python HTTP server on port 8000 - Navigate to `http://localhost:8000/examples/script` and check for errors
1 parent 0623ccd commit b952440

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ permissions: read-all
66
jobs:
77
unit:
88
runs-on: ubuntu-latest
9-
109
steps:
1110
- name: Checkout repository
1211
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -39,7 +38,6 @@ jobs:
3938
strategy:
4039
matrix:
4140
browser: [chromium, firefox, webkit]
42-
4341
steps:
4442
- name: Checkout repository
4543
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -58,3 +56,28 @@ jobs:
5856

5957
- name: Run browser tests on ${{ matrix.browser }}
6058
run: npm test -- --config=vitest.config.browser.mts --browser=${{ matrix.browser }}
59+
60+
e2e:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
65+
66+
- name: Use Node.js
67+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
68+
with:
69+
cache: npm
70+
node-version-file: .nvmrc
71+
72+
- name: Install dependencies
73+
run: npm ci --prefer-offline
74+
75+
- name: Build package
76+
run: npm run build
77+
78+
- name: Test UMD page
79+
uses: remarkablemark/page-test-action@501177ce8d124eff6bc5e7b930a3dbd62f28a173 # v1.0.6
80+
with:
81+
url: http://localhost:8000/examples/script
82+
start: python3 -m http.server
83+
wait-on: http://localhost:8000

0 commit comments

Comments
 (0)