Refactor the checks
This commit is contained in:
parent
42939e5aa2
commit
363898ed60
10
flake.nix
10
flake.nix
|
@ -41,7 +41,8 @@
|
|||
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local
|
||||
'';
|
||||
};
|
||||
checks.lint = pkgs.stdenv.mkDerivation {
|
||||
checks = {
|
||||
lint = pkgs.stdenv.mkDerivation {
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
@ -52,10 +53,10 @@
|
|||
checkInputs = [ pkgs.inventoryEnv ];
|
||||
checkPhase = ''
|
||||
mkdir -p $out
|
||||
flake8 . --count --show-source --statistics | tee $out/test.log
|
||||
flake8 . --count --show-source --statistics
|
||||
'';
|
||||
};
|
||||
checks.tests = pkgs.stdenv.mkDerivation {
|
||||
tests = pkgs.stdenv.mkDerivation {
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
@ -70,11 +71,10 @@
|
|||
-nauto \
|
||||
--nomigrations \
|
||||
--cov=./src \
|
||||
--cov-report=html \
|
||||
./src
|
||||
cp -r htmlcov $out/
|
||||
'';
|
||||
};
|
||||
};
|
||||
packages.venv = pkgs.inventoryEnv;
|
||||
packages.inventory = pkgs.inventoryPackage;
|
||||
packages.default = pkgs.inventoryPackage;
|
||||
|
|
Loading…
Reference in New Issue