Skip to content
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

GitHub Actions Running too Frequently #49

Closed
gvee-uk opened this issue Jul 5, 2022 · 3 comments · Fixed by #50
Closed

GitHub Actions Running too Frequently #49

gvee-uk opened this issue Jul 5, 2022 · 3 comments · Fixed by #50

Comments

@gvee-uk
Copy link
Contributor

gvee-uk commented Jul 5, 2022

CI and CD stuff is running too frequently.

Ideally I think we want:

  1. Run CI when a PR is created
  2. Run CI when a PR is updated with a new commit
  3. Run CI when a PR is merged to main (note: not just closed, because that can include abandons)
  4. Run CD when CI for a merge to main has completed

Due to the running costs for Windows and MacOS (see #48 for instance) I think we should limit all CI elements to run on Linux agents only for now.

@gvee-uk
Copy link
Contributor Author

gvee-uk commented Jul 5, 2022

A few initial musings:

  1. Official docs for running your workflow when a pull request merges
  2. Dependent jobs can be created using the needs options (see here for more information.
  3. Should we add on: workflow_dispatch to allow for manual running of CD workflows? If for whatever reason the CD actions fail then we might want the ability to manually kick things. Consider how this will work with (or against!) the cz bump stuff.
  4. The ** branch filter should probably be removed. I think this is what's triggering the double-running of stuffs.
  5. We should consider caching Python dependencies
  6. I'd be tempted to chain the CD side of things so that the more expensive runners (i.e. Windows and MacOS) run after the cheaper ones (i.e. Linux, then Windows, then Mac).
  7. Concurrency settings might be useful for the PR updates e.g. we could cancel any currently running CI run if a new commit is pushed.

@GooseLF
Copy link
Contributor

GooseLF commented Jul 6, 2022

I'd be happy using concurrency on the release builds since they only ever run off of the main branch and only run once the CI has finished successfully to trigger them. Reluctant to add cancel-in-progress to the CI as people working in different PR's wouldn't want to cancel out each other's builds E.G My code breaks the build, yours doesn't, other than commit message how do we tell who broke it?

@gvee-uk
Copy link
Contributor Author

gvee-uk commented Jul 6, 2022

Reluctant to add cancel-in-progress to the CI as people working in different PR's wouldn't want to cancel out each other's builds E.G My code breaks the build, yours doesn't, other than commit message how do we tell who broke it?

I didn't realise that's how the cancel-in-progress worked. I has naively assumed it would work based on source branch or something.

Perhaps the group can be set to the name of the source branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants