mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 09:54:19 +02:00
allow disabling automatic cargo test checks
Some checks failed
CI / checks (push) Has been cancelled
Some checks failed
CI / checks (push) Has been cancelled
This commit is contained in:
parent
9f851855a9
commit
7e45bb598f
1 changed files with 19 additions and 8 deletions
|
|
@ -123,6 +123,11 @@ in
|
||||||
});
|
});
|
||||||
description = "rust toolchain to use for miri";
|
description = "rust toolchain to use for miri";
|
||||||
};
|
};
|
||||||
|
cargoTest = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "create a check for `cargo test`";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
|
|
@ -273,13 +278,6 @@ in
|
||||||
packageOpts = config.packageOpts pkgs;
|
packageOpts = config.packageOpts pkgs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
test = craneLib.cargoTest (commonCraneArgs
|
|
||||||
// {
|
|
||||||
inherit cargoArtifacts;
|
|
||||||
doCheck = true;
|
|
||||||
cargoExtraArgs = "--locked --all-targets ${maybeWorkspace}";
|
|
||||||
}
|
|
||||||
// packageOpts);
|
|
||||||
clippy = craneLib.cargoClippy (commonCraneArgs
|
clippy = craneLib.cargoClippy (commonCraneArgs
|
||||||
// {
|
// {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
|
|
@ -287,6 +285,15 @@ in
|
||||||
}
|
}
|
||||||
// packageOpts);
|
// packageOpts);
|
||||||
}
|
}
|
||||||
|
// (optionalAttrs config.cargoTest {
|
||||||
|
test = craneLib.cargoTest (commonCraneArgs
|
||||||
|
// {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
doCheck = true;
|
||||||
|
cargoExtraArgs = "--locked --all-targets ${maybeWorkspace}";
|
||||||
|
}
|
||||||
|
// packageOpts);
|
||||||
|
})
|
||||||
// (optionalAttrs hasMsrv
|
// (optionalAttrs hasMsrv
|
||||||
{
|
{
|
||||||
msrv =
|
msrv =
|
||||||
|
|
@ -301,13 +308,15 @@ in
|
||||||
}
|
}
|
||||||
// packageOpts);
|
// packageOpts);
|
||||||
})
|
})
|
||||||
// (optionalAttrs hasNonDefaultFeatures {
|
// (optionalAttrs (hasNonDefaultFeatures && config.cargoTest) {
|
||||||
test-all-features = craneLib.cargoTest (allFeaturesCraneArgs
|
test-all-features = craneLib.cargoTest (allFeaturesCraneArgs
|
||||||
// {
|
// {
|
||||||
cargoArtifacts = cargoArtifactsAllFeatures;
|
cargoArtifacts = cargoArtifactsAllFeatures;
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
}
|
}
|
||||||
// packageOpts);
|
// packageOpts);
|
||||||
|
})
|
||||||
|
// (optionalAttrs hasNonDefaultFeatures {
|
||||||
clippy-all-features = craneLib.cargoClippy (allFeaturesCraneArgs
|
clippy-all-features = craneLib.cargoClippy (allFeaturesCraneArgs
|
||||||
// {
|
// {
|
||||||
cargoArtifacts = cargoArtifactsAllFeatures;
|
cargoArtifacts = cargoArtifactsAllFeatures;
|
||||||
|
|
@ -315,13 +324,15 @@ in
|
||||||
}
|
}
|
||||||
// packageOpts);
|
// packageOpts);
|
||||||
})
|
})
|
||||||
// (optionalAttrs hasDefaultFeatures {
|
// (optionalAttrs (hasDefaultFeatures && config.cargoTest) {
|
||||||
test-no-default-features = craneLib.cargoTest (noDefaultFeaturesCraneArgs
|
test-no-default-features = craneLib.cargoTest (noDefaultFeaturesCraneArgs
|
||||||
// {
|
// {
|
||||||
cargoArtifacts = cargoArtifactsNoDefault;
|
cargoArtifacts = cargoArtifactsNoDefault;
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
}
|
}
|
||||||
// packageOpts);
|
// packageOpts);
|
||||||
|
})
|
||||||
|
// (optionalAttrs hasDefaultFeatures {
|
||||||
clippy-no-default-features = craneLib.cargoClippy (noDefaultFeaturesCraneArgs
|
clippy-no-default-features = craneLib.cargoClippy (noDefaultFeaturesCraneArgs
|
||||||
// {
|
// {
|
||||||
cargoArtifacts = cargoArtifactsNoDefault;
|
cargoArtifacts = cargoArtifactsNoDefault;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue