percy / percy-storybook

Percy's Storybook SDK.
https://docs.percy.io/docs/storybook
MIT License
150 stars 45 forks source link

Exit code is 0 when snapshot limit is exceeded #743

Open bernardobelchior opened 1 year ago

bernardobelchior commented 1 year ago

The problem

When running PERCY_TOKEN=<token> npx percy storybook ./storybook-static and the snapshot limit has been reached, the CLI does not return a non-zero exit code. When using in CI, it means CI won't fail and will instead pass even though tests could be failing.

This happens both in my local mac as well as on CI (GH Actions running on ubuntu-latest).

Environment

Details

$ PERCY_TOKEN=<token> npx percy storybook ./storybook-static
[percy] Percy has started!
  <truncated for brevity>
[percy] Failed to create build
[percy] Error: This organization has exceeded the limits of the Percy BrowserStack plan plan. Administrators can upgrade here: https://percy.io/organizations/<censored>/billing
[percy] Build not created

$ echo $?
0

Debug logs

See above

Code to reproduce issue

N/A

samarsault commented 1 year ago

Thanks for reaching out. We already have this on our roadmap and will be adding this soon

bernardobelchior commented 1 year ago

Thank you, @samarsault 🙏