Enable automatic test runs on commit
It would be highly beneficial to the project to have automatic test runs (npm test) for every commit. To this end, a GitHub action that (eventually) invokes npm test would be fantastic.
@fluffynuts,
I tried to add an NPM-based test run as you suggested in: https://github.com/apache/logging-log4net/blob/master/.github/workflows/build.yaml
However this fails on Ubuntu and MacOS (see run 10825983032), whereas the dotnet-based run 10825714954 doesn't. Could you look into that?
Please can you link to run logs or copy here. Chances are very good that zarro is trying to run as if it were testing netfx instead of dotnet core because that's the default behavior for backward compatibility. Setting the environment variable DOTNET_CORE=1 would change that behavior.
That could be set on the action, in the package.json via cross-env or in the .zarro-defaults file, wherever is most convenient.
Perhaps it's time for nom test to default to dotnet core all the time - in which case, the best approach, imo, is to put that line into .zarro-defaults as it would be applied only if nothing else override it already, meaning someone could force Netflix testing with DOTNET_CORE=0
@fluffynuts, the logs are available in the two runs I cited before:
I don't know which logs are relevant, so I didn't include any.
@ppkarwasz @fluffynuts, are you still working on that? If not, can I try to make it work?
@gdziadkiewicz you can try. Piotr and Davyd don't have enough time.
@gdziadkiewicz,
As Jan said, go ahead, we are swamped with other tasks.
IIRC Jan said that the Log4Net version does not need NPM, so maybe the workflow should just use dotnet.
I'd suggest using npm though - zarro does "all the right things" by convention when testing dotnet projects. npm test should just work everywhere.
None of this has to be your problem though:
- ensure the runner has node installed
npm ibeforenpm test
Apart from providing a single "entry point" for tooling (npm), npm test also will output much more useful information when testing than dotnet test will, including:
- colored output for every test (you'd have to raise the logging level to get it from
dotnet) with pretty icons - a summary failed tests at the end - no need to scroll back through pages of test output to find what failed
- test metrics - total, passed, failed, skipped, run-time