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

Allow per-campaign tests #594

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Allow per-campaign tests #594

wants to merge 4 commits into from

Conversation

gbirke
Copy link
Member

@gbirke gbirke commented Oct 22, 2024

Allow (and enforce) per-campaign tests instead of reusing the same test folder for every new campaign. Add CI check to check if channel name in test folder matches imports in test files, to avoid forgetting to adapt the tests.

Do a daily run of all banner tests to ensure backwards compatibility (we might need to adjust the notification settings for that in a followup PR)

When this is merged and you rebase, you'll have to adjust current PRs to use new structure, otherwise they'll fail.

Ticket: https://phabricator.wikimedia.org/T369276

Banner tests in `test/banners` should now follow the
`CHANNEL_NAME/CAMPAIGN_NAME`  structure of the `banners` directory.

The vitest configuration will exclude all banner tests that are not in
the current configuration.

Ticket: https://phabricator.wikimedia.org/T369276
Get a baseline to check if the new vitest configuration works (two kinds
of tests in desktop) and to provide a structure for other tests.

Renamed the wikipedia.de channels in `campaign_info.toml` to match
folder names to channel names. This now must be adjusted in
https://github.com/wmde/banner-screenshots/blob/main/src/CommandLine/determineCampaignFromBranchName.ts

Turn missing tests into errors.
Use GitHub actions to run daily compatibility checks. We might need to
change this workflow and [add a notification step][1]. According to the
[official documentation][2], only the last committer of this workflow
gets the notification emails.

[1]: https://stackoverflow.com/questions/62304258/github-actions-notifications-on-workflow-failure
[2]: https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/monitoring-workflows/notifications-for-workflow-runs

Ticket: https://phabricator.wikimedia.org/T369276
Enforce importing from the same folder to avoid copy-paste errors,
running tests on old banners.

Ticket: https://phabricator.wikimedia.org/T369276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants