CI: Fixes #12440: Disable logging from onenote-converter library by checking if it a test run #12566
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12440
Summary
I'm adding a new configuration for the
onenote-converter
check if it was build to run tests in CI. This should disable the logs when running tests there but it won't disable when running it locally, unless it used with theRUN_TESTS=1
environment variable. This also shouldn't affect the production build, sinceRUN_TESTS
is set to 0 when running the release CI.Why the logs?
There are some logs from
onenote-conveter
that I think are useful to understand why something might go wrong. For example, some places where the binary backup does not have a valid value we use a default value in its place so the import process doesn't fail to include that note.On each of these cases I'm adding a log so if something goes wrong in the import content of the user we might be able to relate the two things.
Testing
I'm going to take a look at the output of the CI to confirm that the messages being logged were removed.