Different test dependencies for different Julia versions?

gdalle
Thu, 02 May 2024 23:24:57 +0000
Package Management

I want to make a package compatible with Julia 1.6, but some of my test dependencies are only compatible with Julia 1.10. How can I avoid requiring them when testing on 1.6?
The associated tests can be put inside an if VERSION >= v"1.10" but AFAICT pkg> test will still try to install every all the test dependencies. Is that best handled in the CI files?

Related question that I’m still curious about:

How to test package with different sets of test dependencies General Usage

Suppose for various reasons I want to test a package with two different test/Project.toml’s. These will have different packages / compat bounds and my single runtests.jl is conditional on which dependencies are loaded. Is there any streamlined / recommended way to do this? Both locally and for GitHub actions? Thanks for any suggestions.

2 posts - 2 participants