-
Notifications
You must be signed in to change notification settings - Fork 19
feat , check for min_coverage run time type and show proper error based on the result #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat , check for min_coverage run time type and show proper error based on the result #258
Conversation
Hi @maxzod ! Thanks for the contribution, can you include some tests to? 💙 |
@alestiago sure will add them ASAP |
Hello @maxzod 👋 💙 , thanks for contributing (once again 😄)! Are you still planning to work on this 👀? There's no rush, I just wanted to check on the status of this Pull Request. |
sure , I am still planing to do it |
if (typeof minCoverage == 'number') return true; | ||
|
||
if (minCoverage.toString().includes('%')) { | ||
core.setFailed('❌ Failed to use min_coverage remove the `%` symbol'); | ||
return false; | ||
} | ||
core.setFailed('❌ Failed to use min_coverage value make sure you added a number'); | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not just parse the value as a int and see if we can? Instead of having "checks" for different cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wolfenrain I don't get your point!
i think i need some help to figure out how to write a test for this code! |
Hi @maxzod , sorry for the late reply. Do you still need help with this? |
@alestiago , yes |
Hi @maxzod, from our side, we should have a CONTRIBUTING file to help new contributors, I've made a separate issue to tackle this #274 (feel free to drop a 👍 if you think it would be helpful ). Regardless, I'll try my best on providing some guidance.
// Specify input:
process.env['INPUT_MIN_COVERAGE'] = 85;
// Run the tool:
cp.execSync(`node ${ip}`, { env: process.env }).toString();
try {
cp.execSync(`node ${ip}`, { env: process.env }).toString();
fail('this code should fail');
} catch (err) {
expect(err).toBeDefined();
}
I hope these bullet points help you out! If you have any further questions feel free to drop them here 💙 |
@maxzod did the test guidance help? Any updates here? Do you still have bandwidth to work on this? |
Hi @maxzod I'll be closing this Pull Request, since we usually give a two week period of inactivity before closing. Feel free to re-open if you would like to continue working on it! Thank you 💙 🙌 |
Description
check for min_coverage run time type and show proper error based on the result
#255
Type of Change