lodestar
lodestar copied to clipboard
Duplicate actions in the CI pipeline
Describe the bug
There are few actions in the CI pipeline, which duplicates with others. e.g. The tests runs twice on a PR when you push new commit.
Expected behavior
The CI tasks should not be duplicate on any case
Steps to Reproduce
- Create a PR
- Push some commit to it
Additional Information
There are certain tasks in the PR which can be run in parallel to speed up the CI. e.g. Linting and Unit tests don't need to be run in the sequence.
Some reference:
https://github.com/marketplace/actions/skip-duplicate-actions
I think the tests run once on the feature branch ("push') and once on the feature branch merged into the base branch ('pull_request'). Maybe there are some other duplicate actions though.
The reason we run lint and unit tests sequentially is bc it takes longer to run them in parallel since the setup takes longer than linting. Not sure if thats still the case, but thats the original reason.
The pull request trigger works on the push as well. So why for each push these CI tasks run twice.
For the other tasks, not everything can run parallel, but there are few tasks e.g. browser tests and unit test that we can run in parallel to speed up the CI.
There still seems to be redundant pipelines executing on PRs. Which is taking unnecessary time in CI cycle.

I think we still want both. They are not redundant.
My understanding is that push
and pull_request
run the tests from two different commits.
push
runs the tests from the branch, pull_request
runs the tests from the base branch with the feature branch merged.
Yes that's because of the checkout actions. actions/checkout@v2
and particular behavior of GITHUB_SHA
for each event. Don't you think it's important to checkout only the merge reference on the PRs to save time on CI?
Closed with https://github.com/ChainSafe/lodestar/pull/4552