Skip to content
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

Improved the screenshots workflow. #18149

Merged
merged 2 commits into from May 13, 2024

Conversation

ngnpope
Copy link
Member

@ngnpope ngnpope commented May 9, 2024

Trac ticket number

N/A

Branch description

Makes the following improvements to the screenshots workflow:

  • Removed summary and obsolete identifier (left over from earlier version of the implementation)
  • Optimized images to reduce size by ~30%
  • Changed to save images to <case>/<test-name>-<name>.png instead of <test-name>_<case>-<name>.png
  • Added a top-level commit hash folder in the artifact archive, i.e. <commit-hash>/<case>/<test-name>-<name>.png
  • Fail the workflow if the upload artifacts step doesn't upload any files

These changes are particularly useful when generating a series of screenshots and downloading for comparison, making it easier to find things.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.

@ngnpope
Copy link
Member Author

ngnpope commented May 9, 2024

👋🏻 @sarahboyce These were some things I thought could be improved that I spotted when I was reviewing #18080.

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

.github/workflows/screenshots.yml Outdated Show resolved Hide resolved
django/test/selenium.py Outdated Show resolved Hide resolved
@ngnpope ngnpope force-pushed the screenshots-improvements branch 2 times, most recently from 5083a31 to f8024b8 Compare May 9, 2024 18:46
django/test/selenium.py Outdated Show resolved Hide resolved
@sarahboyce
Copy link
Contributor

sarahboyce commented May 10, 2024

[Note that I have done ever so slight changes to the commits but no changes to the content, I am approving the first 3 commits which are a series of improvements to the screenshots workflow. I will pull these out and merge separately. The last two commits each require manual test runs that I plan to do later.]

@sarahboyce sarahboyce added the selenium Apply to have Selenium tests run on a PR label May 10, 2024
Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@sarahboyce sarahboyce merged commit ceaf1e2 into django:main May 13, 2024
22 of 33 checks passed
@ngnpope ngnpope deleted the screenshots-improvements branch May 13, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
screenshots 🖼️ selenium Apply to have Selenium tests run on a PR
Projects
None yet
2 participants