cmake-workflow: Always check test results if they run#34
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #34 +/- ##
========================================
Coverage 95.37% 95.38%
========================================
Files 117 116 -1
Lines 10948 10938 -10
Branches 2659 2658 -1
========================================
- Hits 10442 10433 -9
+ Misses 474 473 -1
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Yes. I agree. The design at the time was a little more controversial than that, but it's time to change it. The thing is, there were people using this action to just build and install things. And then get blocked by tests they didn't ask for. That's why it became the default to check tests only if the person explicitly asked for tests. The reading was like "the user didn't ask for tests so there are no tests here but we can't stop cmake from doing it so we won't check it". Or something like that. Yes. It needs to change. Thanks for the PR. |
|
Sorry. I think I wasn't clear enough.
If you'd like, you can modify the PR to do exactly that, and I'll adjust whichever library I have accordingly so it doesn't depend on the old behavior. |
I find the default configuration for
run-testsin the CMake workflow a bit confusing. Unless theCMAKE_RUN_TESTSenvironment variable is set, the tests run, but they're not checked.If you blindly take the example from https://alandefreitas.github.io/cpp-actions/cpp-actions/actions/cpp-matrix.html#_usage, you might never realize that the tests are not checked (that was the case for me 🙂). Moreover, even if you check the output when adding the action, you'll see that tests run. Since the tests should usually just pass, you'll expect the result to be checked.
In this PR I added a label to the group. Hopefully people will then check what it's about. I wanted to avoid changing the default, but I think by default the tests should be checked. However,
--no-tests=ignoreshould still be passed to avoid failing if no tests are present.