I observed that CI does not run for some PRs. Actually, there was no explicit trigger.
This PR adds this trigger (pull_request) plus a manual trigger (workflow_dispatch).
It also restricts the push trigger to the master branch, to avoid duplicate runs when opening a PR.
This means that CI basically only runs if you open a PR (or push to master, of course). So if you want to test changes, it is not sufficient to push to your feature branch, you also need to open a PR. This is usually what we want anyway.
(Of course, more branch patterns could be added to the push trigger if one wants to run CI on new features without opening PRs. @UnkindPartition, please chime in if this is your way of working...)
I observed that CI does not run for some PRs. Actually, there was no explicit trigger.
This PR adds this trigger (
pull_request
) plus a manual trigger (workflow_dispatch
).It also restricts the
push
trigger to themaster
branch, to avoid duplicate runs when opening a PR. This means that CI basically only runs if you open a PR (or push to master, of course). So if you want to test changes, it is not sufficient to push to your feature branch, you also need to open a PR. This is usually what we want anyway. (Of course, more branch patterns could be added to thepush
trigger if one wants to run CI on new features without opening PRs. @UnkindPartition, please chime in if this is your way of working...)The PR also refines the cache logic to: https://github.com/haskell/actions/issues/7#issuecomment-745697160