lundi 28 septembre 2020

Is there an idiomatic way to setup CI regression tests with nix?

I've been setting up GitLab CI using nix. My current approach is to have a default.nix which contains the packages provided by a git repository.

{
    package_a = import ./package_a/default.nix;
    package_b = import ./package_b/default.nix;
}

CI can then merely invoke nix-build and build/check everything.

The problem comes up with regression tests. I need to run a python regression test which executes something exported from package_a, using a file from package_c (which is not yet managed by nix).

Two possibilities I've considered are either a mkDerivation that manually executes during the check phase, or buildPythonPackage with the regression tests set up as the tests for an empty python package. Both seem like kind of a hack.

Is there an idiomatic way of setting this up with nix? Thanks.

Aucun commentaire:

Enregistrer un commentaire