Skip to content

Commit f2bbbb9

Browse files
author
Robert Flack
committedJul 19, 2023
Generate WPT report and upload to pages.
1 parent 931f10a commit f2bbbb9

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
 

‎.github/workflows/gh-pages.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ jobs:
4141
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
4242
- name: Build with microbundle
4343
run: "npm run build"
44+
- name: Checkout WPT
45+
run: "npm run test-setup"
46+
- name: WPT hosts
47+
run: "./test/wpt/wpt make-hosts-file | sudo tee -a /etc/hosts"
48+
- name: WPT tests
49+
run: "npm run test:wpt"
4450
- name: Clean build files
45-
run: "rm -rf node_modules"
51+
run: "rm -rf node_modules test/wpt"
4652
- name: Upload artifact
4753
uses: actions/upload-pages-artifact@v2
4854
with:

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dist
2626
coverage
2727

2828
test/wpt
29+
test/report
2930

3031
.DS_Store
3132

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"dev": "run-all \"serve\" \" microbundle watch -f iife \"",
1010
"deploy": "npm run build",
1111
"test-setup": "node test/setup/checkout-wpt.mjs",
12-
"test:wpt": "npm run build && npm run test-setup && cd test && cd wpt && python wpt run --install-webdriver --inject-script ../../dist/scroll-timeline.js chrome scroll-animations",
13-
"test:simple": "npm run build && npm run test-setup && cd test && cd wpt && python wpt serve --inject-script ../../dist/scroll-timeline.js"
12+
"test:wpt": "npm run test-setup && cd test && cd wpt && python wpt run --headless -y --log-wptreport ../report/data.json --log-wptscreenshot=../report/screenshots.txt --log-html=../report/index.html --inject-script ../../dist/scroll-timeline.js chrome scroll-animations",
13+
"test:simple": "npm run test-setup && cd test && cd wpt && python wpt serve --inject-script ../../dist/scroll-timeline.js"
1414
},
1515
"repository": {
1616
"type": "git",

0 commit comments

Comments
 (0)