-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
CI: Run date test timezone and locale variations using bash script #27600
CI: Run date test timezone and locale variations using bash script #27600
Conversation
Size Change: 0 B Total Size: 1.21 MB ℹ️ View Unchanged
|
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.
Thanks for the PR, this is better 👍
.github/workflows/unit-test.yml
Outdated
|
||
run: | | ||
npm run test-unit -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" \ | ||
--testPathPattern="packages/date/" | ||
npm run test-unit:date -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache" |
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.
Can we just run this as part of the js unit tests job instead of having a separate job?
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.
Done!
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.
Potentially we could split the two lines into two "run" steps to have separate logs in the UI
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.
Done, much better! Thanks!
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 is much better than the original PR, in my opinion. In working on the GitHub Actions workflows across the rest of the organization, workflow runs and concurrent jobs are not truly unlimited, so we do want to be careful how many we add.
I am not against adding an additional date specific job within the unit test workflow, but only if it's a singular job. I am not too familiar with the JS testing infrastructure for Gutenberg, but it seems that would be difficult to accomplish in the current state due to the timezones and locales being passed through environment variables.
32dd8e4
to
9a00a1e
Compare
Description
Related discussion: #27552 (comment)
To reduce jobs and CI entries, run date tests in different timezones and locales with a bash script.
How has this been tested?
npm run test-unit:date
Screenshots
A failing date test will report the timezone and locale it failed with:
See line 7371
Types of changes
non-breaking change
Checklist: