Run tests against several PostgreSQL versions using Nix (#1492)

* Show test output with postgrest-test-spec* in nix-shell

* Test output in color
This commit is contained in:
Remo
2020-04-24 11:05:37 -05:00
committed by GitHub
parent 3da5a2875e
commit 1c19bbde93
5 changed files with 148 additions and 0 deletions
+19
View File
@@ -42,6 +42,25 @@ Within `nix-shell`, you can run Cabal commands as usual. You can also run
stack with the `--nix` option, which causes stack to pick up the non-Haskell
dependencies from the same pinned Nixpkgs version that the Nix builds use.
## Testing
In nix-shell, you'll find utility scripts that make it very easy to run the
Haskell test suite, including setting up all required dependencies and
temporary test databases:
```bash
# Run the tests against the most recent version of PostgreSQL:
nix-shell --run postgrest-test-spec
# Run the tests against all supported versions of PostgreSQL:
nix-shell --run postgrest-test-spec-all
# Run the tests against a specific version of PostgreSQL (use tab-completion in
# nix-shell to see all available versions):
nix-shell --run postgrest-test-spec-postgresql-9.5.21
```
## Tour
The following is not required for working on PostgREST with Nix, but it will