4 ms·
Oh, that's a misunderstanding then. I think what was meant by "test every commit before allowing merge" was testing each individual commit in a PR branch, not j
by Liskni_si 6y ago
Oh, that's a misunderstanding then. I think what was meant by "test every commit before allowing merge" was testing each individual commit in a PR branch, not just testing PRs before merging. I don't think your solution does this. :-(
- davidjnelson 6y agoThis setup does indeed test every commit in a pr branch. For the “on” property, it only has to be set to “pull_request” to do so. If you also add “commit”, it runs it twice. It does exactly what you wanted it to. Feel free to email me if you need help setting it up, happy to help. Cheers!
- Liskni_si 6y agoThis is really weird. The nodejs template (https://github.com/actions/starter-workflows/blob/master/ci/node.js.yml https://github.com/actions/starter-workflows/blob/master/ci/...) is set up to test on "pull_request" and "push". There's no mention of "commit" anywhere in the documentation, and when I try to add it there in the GitHub editor, it tells me it's incorrect. Are we talking about the same thing?
- davidjnelson 6y agoSetting “on” to pull_request runs my action for each commit I push to a PR branch.
- Liskni_si 6y agoBut this only works if you push each commit separately. If you push them all at once, it only tests the last one. Also, whenever you rebase, only the last commit is tested. I tested this here: https://github.com/liskin/nodejs-hello-world/pull/1 https://github.com/liskin/nodejs-hello-world/pull/1