diff --git a/.ghcid b/.ghcid new file mode 100644 index 0000000..ee086a8 --- /dev/null +++ b/.ghcid @@ -0,0 +1,9 @@ +--command "stack ghci --main-is bowtie:spec --test" +--directory "bowtie" +--test "Main.main" +--warnings +--restart package.yaml +--restart example-app +--restart example-lib + +# See ./bowtie/misc/ghcid-comment.txt for details diff --git a/bowtie/misc/ghcid-comment.txt b/bowtie/misc/ghcid-comment.txt new file mode 100644 index 0000000..12012cc --- /dev/null +++ b/bowtie/misc/ghcid-comment.txt @@ -0,0 +1,10 @@ +The .ghcid file is configuration for https://github.com/ndmitchell/ghcid + +Comments in .ghcid files work strangely. I can't figure out how to keep them from showing up in ghcid's output, so I'm keeping the real comments here instead. + +The config instructs ghcid to compile the main bowtie package and runs its non-doctest tests. + +--dirctory "bowtie" refers to the bowtie subdirectory, this is necessary for the tests to work. +--warnings allows tests to run even if there are warnings. + +NOTE: Is there a way to provide test arguments (eg for when you only want to rerun a specific test)? diff --git a/dev b/dev index 5c10d3a..acef7c3 100755 --- a/dev +++ b/dev @@ -11,23 +11,6 @@ case $1 in stack build --fast --file-watch --test --copy-bins ;; - "ghcid") - # Only compiles the main bowtie package, and only runs its non-doctest tests. - # - # Have to cd into `./bowtie` and run `../dev ghcid` for it to work. - # - # --warnings allows tests to run even if there are warnings. - # - # NOTE: No way to provide test arguments? - ghcid \ - --command "stack ghci --main-is bowtie:spec --test" \ - --test "Main.main" \ - --warnings \ - --restart package.yaml \ - --restart ../example-app \ - --restart ../example-lib \ - ;; - "lunar") watchexec --restart './.bin/bowtie example-app/lunar-lander.bowtie' --watch .bin/bowtie --watch example-app --watch example-lib ;;