nix: postgrest-coverage notice
This commit is contained in:
committed by
Steve Chavez
parent
739f056b0a
commit
531a183b44
+3
-4
@@ -212,15 +212,14 @@ doctests for some of our modules are also available:
|
|||||||
|
|
||||||
## Code coverage
|
## Code coverage
|
||||||
|
|
||||||
Code coverage is available under the `postgrest-coverage` command. This will produce a `./coverage` directory that can be visualized with a simple http server.
|
Code coverage is available under the `postgrest-coverage` command. This will produce a `./coverage` directory that can be visualized on a browser.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Will run all the tests and produce a coverage dir
|
# Will run all the tests and produce a coverage dir
|
||||||
[nix-shell]$ postgrest-coverage
|
[nix-shell]$ postgrest-coverage
|
||||||
|
...
|
||||||
|
|
||||||
# Visualize the output
|
postgrest-coverage: To see the results, visit file://$(pwd)/coverage/check/hpc_index.html
|
||||||
[nix-shell]$ cd coverage
|
|
||||||
[nix-shell]$ python -mSimpleHTTPServer 8080
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Linting and styling code
|
## Linting and styling code
|
||||||
|
|||||||
+2
-2
@@ -164,7 +164,7 @@ let
|
|||||||
${ghc}/bin/hpc markup --highlight-covered --destdir=coverage/overlay "$tmpdir"/overlay.tix || true
|
${ghc}/bin/hpc markup --highlight-covered --destdir=coverage/overlay "$tmpdir"/overlay.tix || true
|
||||||
${ghc}/bin/hpc markup --highlight-covered --destdir=coverage/check "$tmpdir"/check.tix || true
|
${ghc}/bin/hpc markup --highlight-covered --destdir=coverage/check "$tmpdir"/check.tix || true
|
||||||
echo "ERROR: Something is covered by both the tests and the overlay:"
|
echo "ERROR: Something is covered by both the tests and the overlay:"
|
||||||
echo "file://$(pwd)/coverage/check/hpc_index.html"
|
echo "postgrest-coverage: To see the results, visit file://$(pwd)/coverage/check/hpc_index.html"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# copy the result .tix file to the coverage/ dir to make it available to postgrest-coverage-draft-overlay, too
|
# copy the result .tix file to the coverage/ dir to make it available to postgrest-coverage-draft-overlay, too
|
||||||
@@ -174,7 +174,7 @@ let
|
|||||||
|
|
||||||
# create html and stdout reports
|
# create html and stdout reports
|
||||||
${ghc}/bin/hpc markup --destdir=coverage coverage/postgrest.tix
|
${ghc}/bin/hpc markup --destdir=coverage coverage/postgrest.tix
|
||||||
echo "file://$(pwd)/coverage/hpc_index.html"
|
echo "postgrest-coverage: To see the results, visit file://$(pwd)/coverage/hpc_index.html"
|
||||||
${ghc}/bin/hpc report coverage/postgrest.tix "''${_arg_leftovers[@]}"
|
${ghc}/bin/hpc report coverage/postgrest.tix "''${_arg_leftovers[@]}"
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
|||||||
Reference in New Issue
Block a user