-
-
Notifications
You must be signed in to change notification settings - Fork 143
Add PR Check Github Action Workflow #335
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
base: master
Are you sure you want to change the base?
Conversation
| concurrency: | ||
| group: pr-check-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true |
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 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.
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.
Nice. I wonder if this could also be added to the main repo? What do you think?
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.
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? 🙂
…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).
I noticed that right now both the Linting test and the Spelling test are both failing on
masterIf 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
masterprotection Ruleset/branch protection you can require the workflow to pass.I added these both as a single job with:
npm run testThis 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 testthey 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