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

Rewrite GitHub Actions job matrices to avoid repetition #3518

Closed
agriyakhetarpal opened this issue Nov 11, 2023 · 4 comments
Closed

Rewrite GitHub Actions job matrices to avoid repetition #3518

agriyakhetarpal opened this issue Nov 11, 2023 · 4 comments
Assignees
Labels
difficulty: easy A good issue for someone new. Can be done in a few hours priority: low No existing plans to resolve

Comments

@agriyakhetarpal
Copy link
Member

The test_on_push.yml workflow file is slightly long (420+ lines) because there is a lot of repetition of job steps across parallel jobs. The jobs can be refactored into a single job that produces a three-dimensional matrix to run them in parallel. This way, one can write most (related jobs) with extra steps based on certain conditions and avoid repeated job configurations. The trio of unit tests + integration + coverage tests and the pair of example scripts + example notebooks checks would be sufficient for this purpose.

See https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-expanding-configurations for more details. Note that it would require re-naming the jobs accordingly.

@agriyakhetarpal agriyakhetarpal added difficulty: easy A good issue for someone new. Can be done in a few hours priority: low No existing plans to resolve labels Nov 11, 2023
@vanshiz
Copy link

vanshiz commented Dec 2, 2023

I would like to work on this!

@agriyakhetarpal
Copy link
Member Author

Hi @vanshiz, how is this going? To explain things further – the way to go about this would be like skipping integration tests if the running job (defined in the matrix) isn't integration but some other specific test. This way, we can have extra steps listed for a singular job (the common ones + those with specific conditions), but less jobs altogether.

@vanshiz
Copy link

vanshiz commented Dec 16, 2023

Noted. Working on it

@agriyakhetarpal
Copy link
Member Author

Actually, we don't want to do this, because CI/CD pipelines are pretty simple to debug owing to their separated nature in comparison to code files, and therefore we wouldn't mind a slightly longer YAML file (messing with if: conditions and boolean operators is much more prone to error). I shall close this issue for now, @vanshiz you are more than welcome to look for other issues to fix for us.

@agriyakhetarpal agriyakhetarpal closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy A good issue for someone new. Can be done in a few hours priority: low No existing plans to resolve
Projects
None yet
Development

No branches or pull requests

2 participants