generated from Luis/nextjs-python-web-template
readd mypy/pytest to checks
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{ self, ... }: {
|
{ self, ... }: {
|
||||||
perSystem = { inputs', self', pkgs, ... }: {
|
perSystem = { self', pkgs, ... }: {
|
||||||
devShells.clan = pkgs.callPackage ./shell.nix {
|
devShells.clan = pkgs.callPackage ./shell.nix {
|
||||||
inherit self;
|
inherit self;
|
||||||
inherit (self'.packages) clan;
|
inherit (self'.packages) clan;
|
||||||
@@ -25,27 +25,30 @@
|
|||||||
## End optional dependencies
|
## End optional dependencies
|
||||||
};
|
};
|
||||||
|
|
||||||
# check if the `clan config` example jsonschema and data is valid
|
checks = self'.packages.clan.tests // {
|
||||||
checks.clan-config-example-schema-valid = pkgs.runCommand "clan-config-example-schema-valid" { } ''
|
# check if the `clan config` example jsonschema and data is valid
|
||||||
echo "Checking that example-schema.json is valid"
|
clan-config-example-schema-valid = pkgs.runCommand "clan-config-example-schema-valid" { } ''
|
||||||
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
echo "Checking that example-schema.json is valid"
|
||||||
--check-metaschema ${./.}/tests/config/example-schema.json
|
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
||||||
|
--check-metaschema ${./.}/tests/config/example-schema.json
|
||||||
|
|
||||||
echo "Checking that example-data.json is valid according to example-schema.json"
|
echo "Checking that example-data.json is valid according to example-schema.json"
|
||||||
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
${pkgs.check-jsonschema}/bin/check-jsonschema \
|
||||||
--schemafile ${./.}/tests/config/example-schema.json \
|
--schemafile ${./.}/tests/config/example-schema.json \
|
||||||
${./.}/tests/config/example-data.json
|
${./.}/tests/config/example-data.json
|
||||||
|
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# check if the `clan config` nix jsonschema converter unit tests succeed
|
# check if the `clan config` nix jsonschema converter unit tests succeed
|
||||||
checks.clan-config-nix-unit-tests = pkgs.runCommand "clan-edit-unit-tests" { } ''
|
clan-config-nix-unit-tests = pkgs.runCommand "clan-edit-unit-tests" { } ''
|
||||||
export NIX_PATH=nixpkgs=${pkgs.path}
|
export NIX_PATH=nixpkgs=${pkgs.path}
|
||||||
${inputs'.nix-unit.packages.nix-unit}/bin/nix-unit \
|
${self'.packages.nix-unit}/bin/nix-unit \
|
||||||
${./.}/tests/config/test.nix \
|
${./.}/tests/config/test.nix \
|
||||||
--eval-store $(realpath .)
|
--eval-store $(realpath .)
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user