Merge pull request #4 from serokell/balsoft/fix-ci

Fix CI to fail when haddock fails
This commit is contained in:
Ivan Gromakovskii 2019-12-05 18:04:25 +03:00 committed by GitHub
commit 3d7921da5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 10 deletions

View File

@ -4,12 +4,17 @@ let
hn = nixpkgs.haskell-nix;
in (hn.stackProject {
src = hn.haskellLib.cleanGit { src = ./.; };
cache = with sources; [
{
name = "loot-prelude";
inherit (lootbox) sha256 rev;
url = "https://github.com/${lootbox.owner}/${lootbox.repo}.git";
subdir = "code/prelude";
}
];
modules = [{
packages.crossref-verifier = {
# More failures during CI == Less failures in runtime!
postHaddock = ''[[ -z "$(ls -A dist/doc/html)" ]] && exit 1 || echo "haddock successfully generated documentation"'';
package.ghcOptions = "-Werror";
};
}];
cache = with sources; [{
name = "loot-prelude";
inherit (lootbox) sha256 rev;
url = "https://github.com/${lootbox.owner}/${lootbox.repo}.git";
subdir = "code/prelude";
}];
}).crossref-verifier

View File

@ -23,9 +23,9 @@ import Time (ms, threadDelay)
-- | Processing progress of any thing.
data Progress a = Progress
{ pCurrent
{ pCurrent :: a
-- ^ How much has been completed.
, pTotal
, pTotal :: a
-- ^ Overall amount of work.
, pErrors :: !a
-- ^ How many of the completed work finished with an error.