I'm currently trying to generate unit test reports for CI.
This means replacing occurrences of Pkg.test() with TestReports.test() as advertised in https://juliatesting.github.io/TestReports.jl/stable/manual/#Testing-Packages.
However, when using a test/runtests.jl test script along with a dedicated Project.toml and Manifest.toml containing TestReports as a dependency, there are some issues I do not understand so far.
- While doing
(<MyPackage>) pkg>test will lauch the test suite from my package's environment, I can"t figure how to do the same for TestReports.test()
- If I add
TestReports to my package's dependencies (which does not seem a julia thing to do I guess) doing using TestReports; TestReports.test() succeeds
- If I add
TestReports to my package's test environment, doing TestReports.test("MyPackage") fails due to the package not being installed (which seems totally normal).
- If I do
using TestReports in my global environment then activate my package's environment and do TestReports.test() I get the following message
ERROR: MyPackage has version 1.1.0 of TestReports in its test manifest
which is not compatible with the version being used by TestReports (1.0.0)
Update the compat entry of MyPackage.
This message looks somewhat legit and seems to assume TestReports should be in my package's dependencies, although the version numbers reported seem to be nonsense since the latest version TestReports is v 0.7.1 so far.
To sum this up, is there a way to use TestReports without depending on it directly ?
I'm currently trying to generate unit test reports for CI.
This means replacing occurrences of
Pkg.test()withTestReports.test()as advertised in https://juliatesting.github.io/TestReports.jl/stable/manual/#Testing-Packages.However, when using a
test/runtests.jltest script along with a dedicatedProject.tomlandManifest.tomlcontainingTestReportsas a dependency, there are some issues I do not understand so far.(<MyPackage>) pkg>testwill lauch the test suite from my package's environment, I can"t figure how to do the same forTestReports.test()TestReportsto my package's dependencies (which does not seem a julia thing to do I guess) doingusing TestReports; TestReports.test()succeedsTestReportsto my package'stestenvironment, doingTestReports.test("MyPackage")fails due to the package not being installed (which seems totally normal).using TestReportsin my global environment then activate my package's environment and doTestReports.test()I get the following messageTo sum this up, is there a way to use
TestReportswithout depending on it directly ?