Add testing pipelines to Spack packages
The spack package.py files do not contain information about how to run the test suites.
https://spack.readthedocs.io/en/latest/packaging_guide.html#adding-stand-alone-tests
If this was setup we could run e.g. spack --test py-fenics-dolfinx to determine that the Spack installs are functional.
As well as the full tests, there also seems to be the possibility to add minimal lightweight testing that would be executed on every build.
@ma595 did you start on this?
There are two ways to run spack tests:
spack install --test root runs tests after installing. This seems to be working with py-fenics-basix. If tests fail, packages are not installed, which may be a problem. For instance, numba's tests are failing on Rocky Linux (perhaps there's a way around this either by deselecting these tests or installing a more up-to-date numba).
spack test run seems more like what @jhale is referring to. Unfortunately, it doesn't pick up test dependencies (see bottom of this issue), so Pytest cannot be used. We could probably proceed with fenics-dolfinx (c++ tests) this way as it doesn't depend on pytest.
Closing as doing this nicely depends on support in Spack.