5 ms·
This 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
by davidjnelson 6y ago
This 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