CI: the same tests are run five times
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
While looking a bit closer at CI I noticed that make test is run in all five Build and test ${{ matrix.os }} ${{ matrix.arch }} GHA runs. Since every of these runs runs on ubuntu-latest, the exact same tests are run in all five runs. This seems a bit wasteful, especially since running these tests takes around 2/3 of the total run time for each of these runs.
I would propose to run the unit tests (make test) only once in a second stage, similar to the functional tests - or maybe as an intermediate stage between build and functional tests?
@getsops/maintainers what do you think?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the GitHub Actions workflow containing the five Build and test ${{ matrix.os }} ${{ matrix.arch }} runs and inspect how make test relates to the build and functional-test stages. Confirm the existing build, unit-test, and functional-test coverage, then reorganize the workflow so make test runs once and verify the complete CI workflow still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, go
- Domain
- ci-cd, devops
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100