coherent-oss / system

3 stars 0 forks source link

Identify a way to share GitHub workflows #2

Open jaraco opened 1 month ago

jaraco commented 1 month ago

As part of coherent-oss/system#1, I'd like to find a way to do continuous integration without having to copy large amounts of boilerplate into every project. It does appear at first blush as if reusable workflows may do most of that. Here's what I'm imagining:

A repo like coherent-oss/workflows would contain .github/workflows/main.yml with contents similar to that file in skeleton, including the matrix.

And each coherent system project would have a small file with not much more than:

jobs:
  upstream:
    uses: coherent-oss/workflows/.github/workflows/main.yml

Then, the workflow could be centrally maintained to limit the amount of toil in maintaining the common workflow.

Bonus features could include:

jaraco commented 2 weeks ago

One major problem with re-usable workflows might be lack of support for trusted publishing (https://github.com/pypi/warehouse/issues/11096). That doesn't have to block this effort, however.

pawamoy commented 2 weeks ago

There's a way to generate the test matrix dynamically. We could do like coherent-build and query Python's website to get all active versions, then build the Matrix with the result. I can try to show an example later.