mirror of https://github.com/linkerd/linkerd2.git
Depends on #4033 ## Motivation If any job fails in the current GH Actions workflow, a re-run on the same commit SHA requires re-running *all* jobs--regardless if the job already passed in the previous run. This can be problematic when dealing with flakiness in the integration tests. If a test fails due to flakiness in `cloud_integration_tests`, all the unit tests, static checks, and `kind_integration_tests` are re-run which leads to lots of waiting and dealing with the possibility of flakiness in earlier jobs. With this change, individual workflows can now be re-run without triggering all other jobs to complete again first. ## Solution `workflow.yml` is now split into: - `static_checks.yml` - `unit_tests.yml` - `kind_integration.yml` - `cloud_integration.yml` ### Workflows `statc_checks.yml` performs checks related to dependencies, linting, and formatting. `unit_tests.yml` performs the Go and JS unit tests. `kind_integration.yml` builds the images (on Packet or the GH Action VM) and runs the integration tests on a KinD cluster. This workflow continues to run for **all** PRs and pushes to `master` and tags. `cloud_integration.yml` builds the images only on Packet. This is because forked repositories do not need to trigger this workflow. It then creates a unique GKE cluster and runs the integration tests on the cluster. ### The actual flow of work.. A forked repository or non-forked repository opening a PR triggers: - `static_checks` - `unit_tests` - `kind_integration_tests` These workflows all run in parallel and are invidivually re-runnable. A push to `master` or tags triggers: - `static_checks` - `unit_tests` - `kind_integration_tests` - `cloud_integration_tests` These workflows also all run in parallel, including the `docker_build` step of both integration test workflows. This has not conflicted in testing as it takes place on the same Packet host and just utilizes docker layer caching well. Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com> |
||
---|---|---|
.. | ||
ISSUE_TEMPLATE | ||
workflows | ||
CODEOWNERS | ||
PULL_REQUEST_TEMPLATE.md | ||
dco.yml | ||
stale.yml |