Skip to content
Snippets Groups Projects
Commit dc8a0ec1 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Collect and expose coverage as part of the build

parent 5c03284e
No related branches found
No related tags found
1 merge request!24Put ZKAPs into and take ZKAPs out of a database
...@@ -8,6 +8,8 @@ buildPythonPackage rec { ...@@ -8,6 +8,8 @@ buildPythonPackage rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = ./.; src = ./.;
outputs = [ "out" "doc" ];
depsBuildBuild = [ depsBuildBuild = [
sphinx sphinx
circleci-cli circleci-cli
...@@ -30,7 +32,15 @@ buildPythonPackage rec { ...@@ -30,7 +32,15 @@ buildPythonPackage rec {
]; ];
checkPhase = '' checkPhase = ''
${pyflakes}/bin/pyflakes src/_zkapauthorizer runHook preCheck
python -m coverage run --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module twisted.trial _zkapauthorizer "${pyflakes}/bin/pyflakes" src/_zkapauthorizer
python -m coverage run --branch --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module twisted.trial _zkapauthorizer
runHook postCheck
'';
postCheck = ''
python -m coverage html
mkdir -p "$doc/share/doc/${name}"
cp -vr .coverage htmlcov "$doc/share/doc/${name}"
''; '';
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment