flake: Attempt to run doctests
Reviewed-by: Alexander Kobjolke <me@failco.de>
This commit is contained in:
parent
64cdbc9bce
commit
8f76ec738e
6 changed files with 26 additions and 14 deletions
|
|
@ -22,10 +22,8 @@
|
|||
|
||||
packageName = "hcat";
|
||||
in {
|
||||
packages.${packageName} = haskellPackages.callCabal2nix packageName self
|
||||
rec {
|
||||
# Dependency overrides go here
|
||||
};
|
||||
packages.${packageName} =
|
||||
haskellPackages.callCabal2nix packageName self { };
|
||||
|
||||
packages.default = self.packages.${system}.${packageName};
|
||||
|
||||
|
|
@ -64,7 +62,8 @@
|
|||
devShells.default = haskellPackages.shellFor {
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
|
||||
packages = p: [ self.packages.${system}.default ];
|
||||
packages = _:
|
||||
pkgs.lib.filter (x: x != null) [ self.packages.${system}.default ];
|
||||
|
||||
withHoogle = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ executable hcat
|
|||
build-depends:
|
||||
base >=4.13 && <5
|
||||
, hcat
|
||||
, text
|
||||
default-language: GHC2021
|
||||
|
||||
test-suite spec
|
||||
|
|
@ -57,7 +56,7 @@ test-suite spec
|
|||
HCatSpec
|
||||
Paths_hcat
|
||||
hs-source-dirs:
|
||||
test
|
||||
test/spec
|
||||
default-extensions:
|
||||
BlockArguments
|
||||
OverloadedStrings
|
||||
|
|
@ -71,7 +70,4 @@ test-suite spec
|
|||
, base >=4.13 && <5
|
||||
, hcat
|
||||
, hspec
|
||||
, quickcheck-instances
|
||||
, quickcheck-text
|
||||
, text
|
||||
default-language: GHC2021
|
||||
|
|
|
|||
15
package.yaml
15
package.yaml
|
|
@ -11,7 +11,6 @@ extra-source-files:
|
|||
|
||||
dependencies:
|
||||
- base >= 4.13 && < 5
|
||||
- text
|
||||
# - bytestring
|
||||
# - time
|
||||
# - process
|
||||
|
|
@ -29,6 +28,8 @@ default-extensions:
|
|||
|
||||
library:
|
||||
source-dirs: src
|
||||
dependencies:
|
||||
- text
|
||||
verbatim:
|
||||
default-language: GHC2021
|
||||
|
||||
|
|
@ -46,13 +47,19 @@ tests:
|
|||
cpp-options: -DTEST
|
||||
main: Spec.hs
|
||||
source-dirs:
|
||||
- test
|
||||
- test/spec
|
||||
dependencies:
|
||||
- hcat
|
||||
- hspec
|
||||
- QuickCheck
|
||||
- quickcheck-instances
|
||||
- quickcheck-text
|
||||
# - quickcheck-instances
|
||||
# - quickcheck-text
|
||||
build-tools: hspec-discover
|
||||
verbatim:
|
||||
default-language: GHC2021
|
||||
# doctest:
|
||||
# main: Doctest.hs
|
||||
# source-dirs:
|
||||
# - test/doctest
|
||||
# dependencies:
|
||||
# - process
|
||||
|
|
|
|||
10
test/doctest/Doctest.hs
Normal file
10
test/doctest/Doctest.hs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
-- | Rn the doctest executable
|
||||
module Main where
|
||||
|
||||
import System.Process (callProcess)
|
||||
|
||||
doctest :: [String] -> IO ()
|
||||
doctest = callProcess "doctest"
|
||||
|
||||
main :: IO ()
|
||||
main = doctest ["--fast", "src"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue