UnkindPartition / tasty

Modern and extensible testing framework for Haskell
638 stars 108 forks source link

CI: change triggers (PR, push main, manual); refine cache keys #332

Closed andreasabel closed 2 years ago

andreasabel commented 2 years ago

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...)

The PR also refines the cache logic to: https://github.com/haskell/actions/issues/7#issuecomment-745697160