-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
CI Speedup: skip optional install steps in tests #10231
Conversation
… the test to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- How well does this work in Windows? I'm imagining a Bash script in
postinstall
won't work very well. - Isn't license checker something we should want to occur in CI ?
- Would this cause issue with mobile test-running? And if not, for what reason would
npm run mobile-install
need to exist at all? - I'm curious what need there is for building packages in
postinstall
. Was this meant to be something explicitly targeting CI to catch build errors? cc @gziolo
Ah, good point! I'll see if this can be done another way.
Yes, and I think that it still runs with this change because the first job doesn't skip postinstall..
If it does, we can always have those jobs not skip? Those jobs are quick to run anyway, so they don't really need to skip. It's mostly the e2e tests where the install step runs multiple times, although if we can free up resources on other jobs faster, that's nice too. |
We already have a fair bit of bash scripting in the test runner; I'd be happy to refactor that as much as possible but right now I think you need bash to run our tests. |
These are run on simply |
Also, in general, I don't agree with using "it's already not great" as an excuse to perpetuate the not-great. |
Agreed, 100%. I think there should be a way to do the same with a node script instead. |
I see some references to
It might be confusing as we have |
I was working on improving CI build times in December (#13122) and didn't notice What I did notice was that we run I spent some considerable time trying to untangle our build scripts so that we weren't duplicating work. It's tough, though, because a lot of our |
Given above, is this pull request still relevant and expected to be revisited in the near future, or should it be closed? |
Let's close it and revisit once we have a clear path for #13124. It might turn out that this change is no longer necessary. |
Description
During some tests,
npm install
can run multiple times, and the post install step was also run multiple times when the test didn't require it.This introduces a new env var,
SKIP_POSTINSTALL
which lets CI jobs skip the post install step and speed up the test run.The first job, which runs
npm ci
keeps the post install step so that coverage is not affected.This reduces the e2e test run time by a few minutes, from 10-11 minutes to around 8. It also speeds up the other tests by around 45-90 seconds, depending on Travis load.
This should speed up freeing test resources, and make it more bearable to re-run e2e tests that intermittently fail.
The first time this change is merged, the tests will take longer because caches are invalid.