Skip to content

Commit

Permalink
Add .ghcid file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Grant Jeffries committed Nov 10, 2019
1 parent 3cac1d0 commit 07eebf2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
9 changes: 9 additions & 0 deletions .ghcid
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions bowtie/misc/ghcid-comment.txt
Original file line number Diff line number Diff line change
@@ -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)?
17 changes: 0 additions & 17 deletions dev
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down

0 comments on commit 07eebf2

Please sign in to comment.