Skip to content

Commit 37b8faa

Browse files
author
Robert Flack
committed
Make compare a separate test step.
1 parent d89b899 commit 37b8faa

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy site to Pages
1+
name: Build and test
22

33
on:
44
# Runs on pushes targeting the default branch
@@ -52,6 +52,8 @@ jobs:
5252
run: "./test/wpt/wpt make-hosts-file | sudo tee -a /etc/hosts"
5353
- name: WPT tests
5454
run: "npm run test:wpt"
55+
- name: Expected results
56+
run: "npm run test:compare"
5557
- name: Clean build files
5658
run: "rm -rf node_modules test/wpt"
5759
- name: Upload artifact

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
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 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 firefox scroll-animations; cd ../../ && node test/summarize-json.mjs test/report/data.json > test/report/summary.txt && echo 'Comparing test results. If different and expected, patch the following diff to expected.txt:' && diff test/expected.txt test/report/summary.txt)",
13-
"test:simple": "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 firefox scroll-animations || true)",
13+
"test:simple": "npm run test-setup && cd test && cd wpt && python wpt serve --inject-script ../../dist/scroll-timeline.js",
14+
"test:compare": "node test/summarize-json.mjs test/report/data.json > test/report/summary.txt && echo 'Comparing test results. If different and expected, patch the following diff to test/expected.txt:' && diff test/expected.txt test/report/summary.txt"
1415
},
1516
"repository": {
1617
"type": "git",

0 commit comments

Comments
 (0)