Add test_arg input and populate to test_args in test()
This PR aims at increasing flexibility for running Julia tests. The string value of the new test_arg input is passed to test and can be accessed in Julia via the ARGS variable.
Use cases are, for example, distinuishing runs of fast and slow tests.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
d0c4f09) to head (ed29cc7).
Additional details and impacted files
@@ Coverage Diff @@
## main #73 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 2 2
=========================================
Hits 2 2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Is there anything blocking the PR? I would also find the functionality helpful.
I see the in #39 there was a concern about adding too many additional keyword args, but this seems like a very basic piece of functionality.
I would also find this functionality useful, thanks for filing the PR!
I rebased my changes on the current main branch. Hopefully, this gives another impuls for a review of this PR.
I would very much like to see this merged, test_args is a standard part of how Pkg.test operates, and would be great to have the Action support it.
Could we get this to support multiple test_ags, since Pkg.test supports that too? You could leverage Julia's own arg parsing by, in the action.yml, passing inputs as julia test.harness.jl {{ inputs.test_args }}, and then calling Kwargs.kwargs with test_args=ARGS. I think using ARGS would be very natural here, because what Pkg.test does is it makes the test_args available to runtests.jl as ARGS. I'm happy to make a PR into this PR too if that's helpful.
Thanks @mhauru for your comment. Yes, I am totally fine if you add/amend to my PR.
To be honest, I am a little bit reluctant to put to much effort in this PR by myself. This PR is open for quite a while. But the maintainers did not find the time for a review.
Sorry your PR was opened in a period of low maintenance and it fell down in attention. Please feel free to bump when the PR is considered ready again for review/merge.
Thanks @IanButterworth for your comment! I rebased my proposed changes on the latest main branch. From my perspective this PR is ready for review. Could you have a look?
I would suggest to first integrate this PR and then @mhauru could add support for multiple arguments.
Documentation and example is a fair point. I just added a paragraph to the readme. @IanButterworth, could you have a look if this works for you?
@mhauru please go ahead and PR the multiple args work and we can make a release after that