Hey, I have been tasked with kitting out our Pipeline with the ability to fail a build/PR when test coverage is underneath a specific quota. I have read one of your articles which states this as a recommended practice (https://www.atlassian.com/continuous-delivery/introduction-to-code-coverage) but can't actually find any information on how to do it, would appreciate some understanding on this all.
Thanks.
@Louis Willcock @Mathew Morrison
It took me while but it is now working for NodeJS project. Here is what you need to do:
"test": "nyc mocha"
nyc check-coverage --lines ${NYC_CHECK_COVERAGE}
After doing this when ever you create a PR that has coverage less than the value set in the environment variable will fail pipelines.
Cheers.
Why has nobody answered this from Atlassian?
I too would like some clarity on this, is there documentation somewhere? Surely someone would have had an experience with this they can share, some tips or a pointer in the right direction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd really appreciate an answer on how I can fail my builds if coverage is under certain thresholds. I'm still looking for a way to do this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.