Skip to content

Conversation

@JHWelch
Copy link
Contributor

@JHWelch JHWelch commented Oct 26, 2025

I noticed that right now both the Linting test and the Spelling test are both failing on master

If we add a GitHub workflow that checks on PRs, we can more easily notice these problems before they get merged. In fact, if a maintainer wants to add it to the master protection Ruleset/branch protection you can require the workflow to pass.

I added these both as a single job with:

npm run test

This does mean that if someone has both spelling AND linting problems, they will only see the linting first, and then the spelling.

I could split this into one workflow, two jobs, so they run in parallel and you get separate warnings, but I'm not sure if that is overkill, and this ensures if new things get added to npm run test they will automatically get run here.

GItHub Actions are free for public repositories so this will not incur costs.

The second two commits here are resolving the problems.
You can see what failures look like on this Example PR in my fork JHWelch#1

Comment on lines +11 to +13
concurrency:
group: pr-check-${{ github.event.pull_request.number }}
cancel-in-progress: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This ensures that if you push a new commit while tests are still running, it cancels the previous one, and only runs the new relevant one.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice. I wonder if this could also be added to the main repo? What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I created a PR for the main repo (MagicMirrorOrg/MagicMirror#3943). I think with this, we can resolve this conversation and merge the PR, right? 🙂

rejas pushed a commit to MagicMirrorOrg/MagicMirror that referenced this pull request Nov 4, 2025
…uns (#3943)

Add `concurrency` configuration to automatically cancel outdated test
runs when new commits are pushed to the same PR/branch.

Inspired by
[MagicMirrorOrg/MagicMirror-Documentation#335](MagicMirrorOrg/MagicMirror-Documentation#335).
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.

3 participants