Commit 9d5d8ef
authored
refactor(ci): Bypass Lerna and repurpose the 'test-travis' run-script (#129)
## Summary
- Bypass Lerna things in CI
- Don't install `grunt`. I presume it was installed because `test-travis` refers to it, but locally-installed executable modules are on the $PATH in run-scripts so global installation is unnecessary.
- Rename `test-travis` to `test-xbrowser` and modify it such that it only runs cross-browser tests in BrowserStack (via `grunt`), rather than re-running unit tests headlessly+locally _again_ with `npm test` (which is done as part of the `prepare` lifecycle hook that's invoked during `npm install`). The rename makes it clearer that the run-script could plausibly, usefully be run locally as well (say, if one was debugging a consistent failure in some browser).
Lerna seems to be correlated with some recent sporadic timeout failures:
- https://travis-ci.org/optimizely/javascript-sdk/jobs/397898591
- https://travis-ci.org/optimizely/javascript-sdk/jobs/397898592
- https://travis-ci.org/optimizely/javascript-sdk/jobs/397568472
- https://travis-ci.org/optimizely/javascript-sdk/jobs/397568474
- https://travis-ci.org/optimizely/javascript-sdk/jobs/396745267
This PR `cd`'s the Travis CI pipeline directly into the optimizely-sdk package's dir, and does things there. Doing so seems to reduce the mean CI time (compute time on Travis machines, not wall-clock time) from about 21 mins to 15 mins.
## Test plan
This PR's CI run: [#288](https://travis-ci.org/optimizely/javascript-sdk/builds/397977186).1 parent 2389345 commit 9d5d8ef
File tree
4 files changed
+6
-9
lines changed- packages/optimizely-sdk
4 files changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments