Skip to content

Commit 4b34537

Browse files
committed
add note on merging timings
1 parent a7d2a08 commit 4b34537

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ npx cypress-split-merge \
358358

359359
The above command finds all `timings.json` file in the sub folders of `partials/` folder and merges them. It saved the result to `out-timings.json` file and if running on GitHub Actions sets the job output named `merged-timing` to a stringified single line JSON line.
360360

361+
Merging timings files when running on multiple machines in parallel depends on each CI provider. For example, if you use GitHub Actions, you need to upload each timings file at the end of the test job, then download all artifacts and grab all timings files to merge in a separate job. You can find an example of such workflow in my repository [bahmutov/cypress-workflows](https://github.com/bahmutov/cypress-workflows/blob/main/.github/workflows/split.yml). You can find another example of merging JSON files from downloaded GitHub Actions artifacts in [bahmutov/cypress-visited-urls-example](https://github.com/bahmutov/cypress-visited-urls-example/blob/main/.github/workflows/ci.yml).
362+
361363
## Write Timings to a Separate File
362364

363365
You can also indicate where the plugin should output the timings, by setting the `SPLIT_OUTPUT_FILE` environment variable or the corresponding Cypress `env` variable. This will specify the file where the timings will be written. If `SPLIT_OUTPUT_FILE` is not set, the plugin will default to using the same file specified in `SPLIT_FILE`.

0 commit comments

Comments
 (0)