-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show before-and-after sample images in GitHub workflow #956
Conversation
Looks like the PR preview isn't pulling in the web font. The Interstate 40 shield has the wrong width. |
src/js/shield_defs.js
Outdated
["HIST"], | ||
["XYZA"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will be reverted prior to merging. I changed it in order to demonstrate what a before-and-after sample would look like in the build actions.
"name": "athens_ga_7_way_concurrency", | ||
"viewport": { | ||
"width": 400, | ||
"height": 400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this because it's a good sample location for multiple-concurrency shields and shield coloration.
39c31b2
to
01f6dbc
Compare
Ensure that we capture stats from the PR branch
Is the PR Preview supposed to have a preview of all the sample locations? Things look good to me, cool feature. |
The preview is intended to only show sample locations for places where the PR changes the rendering from what's in the main branch. |
Thanks @akadouri for your review, are you good with merging this PR? |
Fixes #958
This PR add before and after image samples to the "PR Preview" GitHub check tab. It only shows locations where there is a change in rendering. The sample locations are defined in tests/sample_locations.json. The before and after images are generated in userland, uploaded to s3, while a markdown file with the change is pushed over the the privileged CI runner.
I had to change the GitHub action to run the before and after builds in separate folders so they wouldn't stomp on each other. I also use the PR branch's render test list and apply it to both the main and PR branch. This ensures that we have apples to apples comparisons. For this reason, the comparison and clipping scripts are also run out of PR branch code.
I also tweaked some of the sample location sizes and added a dense area of NYC and a recently located 7-way concurrency because Americana :)
I've also made a change the Historic US-66 to demonstrate the change in the checks tab, however, I will remove that change prior to merging this PR.
Below is what it looks like in the checks tab, and you can click down in the checks to view it. There are links to the location in the current demo map as well as the PR preview map.
If we think it's useful, a future PR could also generate an image diff to show the pixel differences, perhaps using pixelmatch.