Closed pavelloz closed 8 months ago
I managed to prepare repository with the bug present.
I cloned the example repository, added some of the settings we use in our private repo and there it is, file not found:
https://github.com/pavelloz/cypress-split-timings-example/actions/runs/6783957797/job/18439272097
I will try to narrow down the issue, but maybe the fact that config file is not in root directory, but in cypress/
is the problem.
Ah. It seems like it is the case.
I tried to point to timings by ../timings.json
but it didnt help (which might be a bug)
Would it be possible to make SPLIT_FILE
aware of the surroundings and look for the file relative to a root directory? My project has a different TS config for cypress/ and rest of the project, its much heavier lift than just moving a file like i did in my example repository.
Moving cypress config (and removing reference to it from with:
block) is the correct answer.
Commit: https://github.com/pavelloz/cypress-split-timings-example/commit/3eb7726713ed5efb8b4f8a433cb4343e54d6c1c6 Build successful: https://github.com/pavelloz/cypress-split-timings-example/actions/runs/6784078487/job/18439647479
Right, by default it is looking at the split timings file in the current working directory, which is the one with the Cypress config file. Let me make it simpler by automatically searching folders up from the current directory.
I think current behavior is fine, as long as its possible to point to a file with a relative path, aka ../timings.json
to go one (or more) level above.
Thank you very much for a quick response, cypress-split is a great piece of software :)
:tada: This issue has been resolved in version 1.15.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hello,
Im trying to use
cypress-split
withtimings.json
file.I created
timings.json
in root directory, and tests are incypress/
- just like in the official example repository. ( https://github.com/bahmutov/cypress-split-timings-example/blob/main/.github/workflows/ci.yml#L24 + https://github.com/bahmutov/cypress-split-timings-example/blob/main/timings.json )In the github action config file this is how i point to a file:
Additionally, inside the github action ive run
ls -la *.json
to make sure the file does exist and im not going crazy, and it looks like it is. Im kind of lost. I dont see any config option to change the root directory for cypress github action, so im not sure how it can miss the file.For privacy reasons i cannot give URL to a repository, but if something comes to anyones mind i would be very grateful - maybe someone had similar issue, im out of ideas. :)