-
Notifications
You must be signed in to change notification settings - Fork 44
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
Crashes when run as a GitHub Action #104
Comments
I've been digging into this a little more and found it's related to the For a CI/CD perspective, we're not interested in the detail in the 20K log lines. We're only interested in whether the type coverage meets our threshold. So we can use a shell pipeline to limit the output to just the last two lines: type-coverage | tail -n 2 The problem with this is: even if Now my GitHub Action step to run - name: Check TypeScript Coverage
shell: bash
run: |
type-coverage | tail -n 2
exit ${PIPESTATUS[0]} This correctly fails when A better solution than this workaround would be to modify this predicate:
|
|
Version(if relevant):
type-coverage 2.18.0
typescript 4.3.5
Environment(if relevant):
Code(if relevant):
Type Coverage config in
package.json
Expected:
Running
type-coverage
will only output the ratio used to calculate the coverage percentage and the result of the "at least" condition. If the condition is not met, exit with exit code 1. For example:Actual:
Running
type-coverage
dumps thousands of log lines and exits abruptly. For example:The text was updated successfully, but these errors were encountered: