Refactor the checks

This commit is contained in:
Andreas Zweili 2022-11-27 21:36:06 +01:00
parent 42939e5aa2
commit 363898ed60
1 changed files with 33 additions and 33 deletions

View File

@ -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;