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

Migrate translation-tests to GitHub Actions #7222

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Migrate translation-tests to GitHub Actions #7222

merged 1 commit into from
Aug 15, 2024

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Aug 15, 2024

Status

Ready for review

Description of Changes

Translation tests are slow because it's our normal tests just run 20+ times, once for each language. We can use a dynamic matrix to generate separate jobs pretty easily (I learned this pattern from https://github.com/suzuki-shunsuke/example-github-actions-dynamic-matrix).

This job is a little special as we only run it in specific circumstances. Two are easy to handle 1) branch filter and 2) scheduled run.

But only triggering on PRs from "weblate-fpf" is a bit harder, so we add some run-time logic in the locales job itself.

Testing

  • Visual review
  • CI for push passes and runs full Translation jobs
  • CI for pull request runs locales job but skips Translation / test jobs

Deployment

Any special considerations for deployment? n/a

Translation tests are slow because it's our normal tests just run 20+
times, once for each language. We can use a dynamic matrix to generate
separate jobs pretty easily (I learned this pattern from
https://github.com/suzuki-shunsuke/example-github-actions-dynamic-matrix).

This job is a little special as we only run it in specific
circumstances. Two are easy to handle 1) branch filter and 2) scheduled
run.

But only triggering on PRs from "weblate-fpf" is a bit harder, so we add
some run-time logic in the locales job itself.
@legoktm legoktm requested a review from a team as a code owner August 15, 2024 18:16
@cfm cfm self-assigned this Aug 15, 2024
Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

Gorgeous.

matrix:
locale: ${{ fromJson(needs.locales.outputs.locales) }}

Thanks, @legoktm.

@cfm cfm merged commit 8387df8 into develop Aug 15, 2024
53 checks passed
@legoktm legoktm deleted the l10n-gha branch August 15, 2024 18:42
legoktm added a commit to wikimedia/mediawiki-docker that referenced this pull request Aug 18, 2024
I figured out this trick when working on SecureDrop (freedomofpress/securedrop#7222),
we can dynamically generate the values for the matrix so we don't have
to update them. That's not really a big burden anyways, but this is
kind of cool.
legoktm added a commit to wikimedia/mediawiki-docker that referenced this pull request Aug 18, 2024
I figured out this trick when working on SecureDrop (freedomofpress/securedrop#7222),
we can dynamically generate the values for the matrix so we don't have
to update them. That's not really a big burden anyways, but this is
kind of cool.
legoktm added a commit to wikimedia/mediawiki-docker that referenced this pull request Aug 18, 2024
I figured out this trick when working on SecureDrop (freedomofpress/securedrop#7222),
we can dynamically generate the values for the matrix so we don't have
to update them. That's not really a big burden anyways, but this is
kind of cool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants