mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Consider revising GitHub Actions workflows for maintainability #1037

Closed matthewfeickert closed 1 year ago

matthewfeickert commented 1 year ago

I see in your comment above that more cleaning could be done, that could be a great idea, feel free to tell us more about that!

Sure. Some of this is just matters of preference, and obviously whatever works best for you is what you should do, but I've found it easier to maintain GitHub Actions workflows by separating them out into multiple workflows rather than having them all exist in one, like you normally would do for Travis CI, GitLab pipelines, etc. So for example, the

https://github.com/mwouts/jupytext/blob/e0974221d23a42e508755abee2160bfe282e66ba/.github/workflows/continuous-integration.yml#L58-L85

job doesn't need to live in your CI workflow, but could exist as a separate codeql-analysis.yml workflow.

Also, unless I'm mistaken about its purpose, the

https://github.com/mwouts/jupytext/blob/e0974221d23a42e508755abee2160bfe282e66ba/.github/workflows/continuous-integration.yml#L11-L19

can be replaced with GitHub Actions concurrency control (c.f. https://docs.github.com/en/actions/using-jobs/using-concurrency). i.e. something like

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Originally posted by @matthewfeickert in https://github.com/mwouts/jupytext/issues/1035#issuecomment-1416172431

mwouts commented 1 year ago

Fixed by #1084