-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions workflow for automated testing #2
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
Conversation
Co-authored-by: splitbrain <86426+splitbrain@users.noreply.github.com>
Co-authored-by: splitbrain <86426+splitbrain@users.noreply.github.com>
splitbrain
left a comment
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.
do not run the tests twice when a pr is created from a branch in this repo - you can skip running the push workflow then
.github/workflows/test.yml
Outdated
| push: | ||
| branches: [ "**" ] | ||
| pull_request: | ||
| branches: [ "**" ] |
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.
leave out the branches if they aren't limited anyway
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.
Removed in 00562dd. The pull_request trigger no longer has a branches specification.
Co-authored-by: splitbrain <86426+splitbrain@users.noreply.github.com>
Fixed in 00562dd. Push events now only trigger on main/master branches, while pull_request events run for all branches. This prevents duplicate test runs when PRs are created from branches in the same repo. |
Adds CI automation to run tests on push and pull request events.
Changes
.github/workflows/test.yml: GitHub Actions workflow that checks out code, sets up Go 1.25.5, and runsmake testpermissions: contents: readto limit token scopeThe workflow avoids running tests twice when PRs are created from branches in the same repository by limiting push triggers to main/master branches while running on all pull request events.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.