Commit Graph
100 Commits
Author SHA1 Message Date
monacoremoandWolfgang Walther bfbec8fa36 refactor: Carve out QueryParams module 2022-01-07 09:32:33 +01:00
monacoremo 43c8bde8ce refactor: Add doctests 2021-11-13 04:07:46 +01:00
monacoremo 82dd1b732d ci: disable cirrusci stack work cache which seems to create issues 2021-11-12 20:25:22 +01:00
monacoremo 41ac0d5d93 refactor: Remove Protolude.Conv from Middleware 2021-11-12 20:25:22 +01:00
monacoremo 60db026dcc refactor: Remove Protolude.Conv from RangeQuery 2021-11-12 20:25:22 +01:00
monacoremo 47b6f04a66 refactor: Remove Protolude.Conv from AppState 2021-11-12 20:25:22 +01:00
monacoremo f228cccbae refactor: Remove Protolude.Conv from Proxy 2021-11-12 20:25:22 +01:00
monacoremo 3820590649 refactor: Remove Protolude.Conv from SqlFragment 2021-11-12 20:25:22 +01:00
monacoremo 8cc8531e49 refactor: Remove Protolude.Conv from Workers 2021-11-12 20:25:22 +01:00
monacoremo 65062364c4 refactor: Remove Protolude.Conv from Error 2021-11-12 20:25:22 +01:00
monacoremo ebe66cb985 refactor: Remove Protolude.Conv from Statements 2021-11-12 20:25:22 +01:00
monacoremo 9c172db534 refactor: Remove Protolude.Conv from CLI 2021-11-12 20:25:22 +01:00
monacoremo de531b6b41 refactor: Remove Protolude.Conv from OpenAPIw 2021-11-12 20:25:22 +01:00
monacoremo 71cb8afc0d refactor: Remove Protolude.Conv from JSPath 2021-11-12 20:25:22 +01:00
monacoremo 36dbd09459 refactor: Remove Protolude.Conv from ApiRequest 2021-11-12 20:25:22 +01:00
monacoremo fa4df95f55 refactor: Remove Protolude.Conv from Parsers 2021-11-12 20:25:22 +01:00
monacoremo 4104f5fb75 refactor: Remove Protolude.Conv from App 2021-11-12 20:25:22 +01:00
monacoremo abb6167caa refactor: Remove Protolude.Conv from DbStructure 2021-11-12 20:25:22 +01:00
monacoremo 15ea7dfe09 refactor: Remove Protolude.Conv from GucHeader 2021-11-12 20:25:22 +01:00
monacoremo a2c2544271 refactor: Remove Protolude.Conv from Config 2021-11-12 20:25:22 +01:00
monacoremo 2b22f889bd refactor: Remove GHC.Show instances from JSPath module 2021-11-09 19:13:52 +01:00
monacoremo cd3013569e refactor: Remove GHC.Show instances from QualifiedIdentifier and Config 2021-11-09 19:13:52 +01:00
monacoremo 5dc37fc8e8 refactor: Remove GHC.Show instances from Request.Types module 2021-11-09 19:13:52 +01:00
monacoremo 038d84b62d refactor: Remove GHC.Show instances in Preferences module 2021-11-09 19:13:52 +01:00
monacoremo 5cd7d35966 refactor: Make import aliases consistent across the codebase 2021-11-05 08:08:00 +01:00
monacoremo 71262fbc5c nix: Hook hsie check-aliases into postgrest-lint 2021-11-05 08:08:00 +01:00
monacoremo d16a4a9a2b nix: fix statix hints 2021-11-02 23:10:23 +01:00
monacoremo 2357961f48 nix: add statix to postgrest-style 2021-11-02 23:10:23 +01:00
monacoremo 162c4e38af Update stackage to LTS 18.14 (GHC 8.10.7) 2021-11-01 23:23:19 +01:00
monacoremo 0f95900822 nix: Upgrade hsie tool to GHC 8.10.7 2021-11-01 23:23:19 +01:00
monacoremo 8ac14447ef nix: Update nixpkgs to latest unstable version 2021-11-01 23:23:19 +01:00
monacoremo 2982c5de2e nix: Fix postgrest-check 2021-09-23 22:36:58 +02:00
monacoremo add95c32ca ci: Fix triggering events and release actions
* Run CI only on pull requests, push to main and push
  to tags matching v*. This avoids running the CI more than
  once for a single user action
* Change pre-releases, which are now identified by a version
  number with 4 components (e.g., 1.1.1.1)
* Change how release artifacts are packaged, ensuring they
  are executable and compressed with xz
2021-09-23 22:36:58 +02:00
Remo 0ba133a0bd ci: Fix FreeBSD build 2021-09-08 19:11:00 +02:00
Remo b3899e7aa4 ci: Set Docker Hub username 2021-08-08 06:42:59 +02:00
monacoremo 6d9fcfa09f ci: Remove unused create_test_db script 2021-08-08 06:42:59 +02:00
monacoremo 38e5b76996 ci: Remove appveyor.yml 2021-08-08 06:42:59 +02:00
monacoremo ca4539e78d ci: Remove .travis.yml 2021-08-08 06:42:59 +02:00
monacoremo a54a61d00e ci: Remove .circleci/config.yml 2021-08-08 06:42:59 +02:00
monacoremo 142fc06b15 ci: Add .github/release script that tags and pushes a new release 2021-08-08 06:42:59 +02:00
monacoremo c7b1cda3ed ci: Move codecov.yml and add thresholds as intermittent fix to random coverage changes 2021-08-08 06:42:59 +02:00
monacoremo fb2adea5e9 ci: Adjust build status badge in READMEs 2021-08-08 06:42:59 +02:00
monacoremo d9b15adb35 ci: Use GitHub Actions for CI/CD 2021-08-08 06:42:59 +02:00
Remo RechkemmerandGitHub 68bf17118d Upgrade Nix dependencies including nixpkgs and static-haskell-nix (#1899) 2021-07-23 19:54:29 +02:00
Remo RechkemmerandGitHub fdf6c510ec Update changelog (#1897) 2021-07-17 00:14:37 +02:00
monacoremo 83cc358e1b nix: Update static-haskell-nix and fix stripped executable 2021-07-15 09:41:52 +02:00
monacoremo 11374c2fae ci: upgrade stackage to LTS 18.2 / GHC 8.10.4 2021-07-15 09:41:52 +02:00
monacoremo 27c8dabd8d nix: Use GHC 8.10.4 in Nix build environment 2021-07-15 09:41:52 +02:00
monacoremo 9568c4605a nix: Update nixpkgs and static-haskell-nix 2021-07-15 09:41:52 +02:00
Remo RechkemmerandGitHub 6670a3214b refactor: Move accept content type code from App into ApiRequest (#1830) 2021-04-25 21:58:03 +02:00
monacoremo 63e0292e23 fix: Panic when attempting to run with unix socket on non-unix host 2021-04-24 19:42:58 +02:00
monacoremo 59f0fe5b32 fix: Properly close unix domain socket on exit 2021-04-24 19:42:58 +02:00
monacoremo 387c387073 fix: Improve log message on config load 2021-04-24 19:42:58 +02:00
monacoremo acd787a5af refactor: Split main/Main.hs into library modules 2021-04-24 19:42:58 +02:00
Remo RechkemmerandGitHub 915d568257 ci: Use cachix authtoken in CI (#1821) 2021-04-17 16:25:28 +02:00
Remo RechkemmerandGitHub c2c7bbe9dd refactor: remove obsoleted Private module (#1811) 2021-04-12 20:47:22 +02:00
Remo RechkemmerandGitHub 801e229c59 refactor: Carve CLI and Version modules out of Config (#1806) 2021-04-12 19:17:47 +02:00
Remo RechkemmerandGitHub f99fd6cbad refactor: Split up Types.hs and logically organize modules (#1793) 2021-04-11 18:28:01 +02:00
Remo RechkemmerandGitHub 8c44410ce0 remove misleadingly named emptyOnFalse and similar (#1803) 2021-04-11 10:38:35 +02:00
Remo RechkemmerandGitHub 65e7f9e846 nix: Add a tool for checking Haskell imports and exports (#1768) 2021-04-06 11:46:12 +02:00
Remo RechkemmerandGitHub e6973f966b refactor: App.hs and related changes (#1725)
* Use ExceptT to avoid 'staircasing' case analysis in App.hs
* Split large function in App.hs into individual handler functions
* Adapt API of Auth.hs, OpenApi.hs etc. to simplify the use of those modules in App.hs
* Split optional rollback functionality into Middleware
* Unify SimpleError and ApiRequestError into one Error type, so it can be used across modules
2021-02-23 22:41:48 +01:00
Remo RechkemmerandGitHub 0ddd676ef0 nix: Add a script to generate a graph of Haskell imports (#1751) 2021-02-07 22:15:44 +01:00
Remo RechkemmerandGitHub 96478ed016 Add docs to all checked shell scripts in nix 2020-12-28 13:23:12 +01:00
Remo RechkemmerandGitHub 2425cddaed improve io-tests
Tests are now run through unix socket by default allowing
parallel execution. Test setup configuration is done via
environment variables instead of config files.
2020-12-24 16:09:25 +01:00
monacoremoandSteve Chavez f2f639e484 update stack to lts-16.26 2020-12-23 09:39:36 -05:00
monacoremoandSteve Chavez 9cfc66a6a4 upgrade nixpkgs and apply related fixes 2020-12-23 09:39:36 -05:00
Remo RechkemmerandGitHub bf141ca13f feat: Added --dump-schema CLI option to dump JSON of dbStructure schema cache.
Added postgrest-dump-schema to nix-shell returning a YAML dump of the test fixtures.

Authored-by: monacoremo <monacoremo>
2020-12-20 10:22:52 +01:00
monacoremoandSteve Chavez fe09637711 catch ReadTimeout in IO tests 2020-12-17 17:05:03 -05:00
monacoremoandWolfgang Walther a52c114ff4 add test for spec idempotence 2020-12-13 22:13:05 +01:00
Remo RechkemmerandGitHub 71fa87937b Migrate io-tests from bash to pytest
Authored-by: monacoremo <monacoremo>
2020-12-13 16:19:26 +01:00
monacoremoandWolfgang Walther 10a70d4e52 add autocompletion for postgrest-watch 2020-12-01 22:13:41 +01:00
Remo RechkemmerGitHubmonacoremo <monacoremo>
07cb47e6ac Improve dev tools in the Nix environment (#1666)
* Improve dev tools in the nix environment

Added postgrest-build, postgrest-run, postgrest-clean, postgrest-check
and postgrest-watch tools. Changed order of postgrest-test-spec-all to
run backwards from pg13 to pg9.5. Added shellcheck to lint shell scripts
in nix environment.

Co-authored-by: monacoremo <monacoremo>
2020-11-30 22:21:19 +01:00
Remo RechkemmerandSteve Chavez 2eb8083869 Simplify Nix CI jobs 2020-10-14 09:10:47 -05:00
Remo RechkemmerandSteve Chavez 741f017a17 Use Postgres 13 in tests/docker-compose.yml 2020-10-05 13:47:53 -05:00
monacoremoandSteve Chavez e4e84e5714 Upgrade nixpkgs and add Postgres 13 support 2020-10-05 13:47:53 -05:00
Remo RechkemmerGitHubmonacoremo <monacoremo>
7af54c5813 Upgrade nixpkgs to current master and add an upgrade checklist (#1579)
* simplify haskell packages overrides based on new nixpkgs
* update Nix gitignore
* simplify Haskell packages overlay

Co-authored-by: monacoremo <monacoremo>
2020-09-09 19:08:16 -05:00
RemoandSteve Chavez 1f6a824dfb Bump nixpkgs pin to unstable as of 2020-07-13 2020-07-13 18:47:45 -05:00
Remo RechkemmerandGitHub 69b09e312a Nixify io and memory tests (#1538)
* Include tests for io and memory in the Nix environment.
* include spec tests in nix-shell by default
* install the io and memory tests in CI
2020-05-28 12:45:14 -05:00
Remo RechkemmerandGitHub 08186ea51c Nixify CircleCI setup (#1535)
* package ghr
* add nix-based release scripts
* refactor CI based on nix tests and release scripts
* update stack version in circleci
* update makefile
* remove docker directory
* add Docker Hub description
* add README on docker
2020-05-25 11:27:35 -05:00
Remo RechkemmerandGitHub 3a1844ec8e Fix the static build (#1534)
* openssl linking fix is required after all

* remove Cabal override (obsoleted on new nixpkgs)
2020-05-21 14:47:07 -05:00
Remo RechkemmerandGitHub 48c9ac36b1 Bump nixpkgs and simplify/clean up nix setup (#1529)
* Refactor tests and fix README

* fix linting hints from new hlint version

* postgrest-style with new nixpkgs-fmt
2020-05-20 21:30:20 -05:00
Remo RechkemmerandGitHub e6874c866d Fix UNKNOWN being shown as git commit hash (#1533)
Fixes https://github.com/PostgREST/postgrest/issues/1530
2020-05-20 14:10:53 -05:00
Remo RechkemmerandGitHub 289bb66f56 Reduce size of the static docker image by patching the Nix openssl package (#1528)
* hook docker images into the default builds
2020-05-20 11:49:11 -05:00
Remo RechkemmerandGitHub bfcd289855 Build Docker image from Nix (#1522)
* Static docker image

* added tags for latest and with version

* add postgrest repository to docker image name

* set creation date on nix docker images
2020-05-16 11:35:32 -05:00
Remo RechkemmerandGitHub 7c0fbf9b3f Add static build with Nix (fixes #1295) (#1494)
* Include modifications to nixpkgs and static-haskell-nix as patches.

* use the patched static-haskell-nix version

* Add cachix postgrest
2020-05-12 13:31:37 -05:00
RemoandGitHub 8dc16eef27 Documentation on how to run the test suite locally (#316)
Uses the `with_tmp_db` script added in https://github.com/PostgREST/postgrest/pull/1476.
2020-05-06 11:41:14 -05:00
RemoandGitHub f02904a959 Simplify the DbStructure queries (#1478)
* remove unused parts of the DbStructure queries

* explain magic numbers in DbStructure queries

* simplify primary keys query
2020-04-29 13:01:46 -05:00
RemoandGitHub 8b41b71db7 More consistent loading of the test fixtures (#1506)
Remove db setup from the Haskell test suite and include it in the test bash scripts.
2020-04-29 12:22:15 -05:00
RemoandGitHub d4cf8e7abb Hook the Nix styling scripts into CI (#1504) 2020-04-29 10:44:11 -05:00
RemoandGitHub 9134171b95 Fix the cachix push logic in CircleCI
Before pushing to cachix, check if the CACHIX_SIGNING_KEY env var is available.
2020-04-28 14:04:06 -05:00
RemoandGitHub 328c3453f8 Add tips and tricks to using nix-shell (#1505) 2020-04-28 12:45:29 -05:00
RemoandGitHub dbc3aa28c4 Add scripts for linting and styling with all dependencies managed by Nix (#1501)
* Integrate the style and lint dependencies with Nix

* Add documentation on the nix styling scripts.
2020-04-27 15:04:50 -05:00
RemoandGitHub ad92c207f2 Run the spec test suite from the nix build job (#1503)
* Add caching to the tests run in CI with Nix
2020-04-27 13:39:57 -05:00
RemoandSteve Chavez dea6c5eb92 Remove ghc options from stack.yaml
They are redundant after being added to postgrest.cabal in #1489
2020-04-27 12:41:55 -05:00
RemoandGitHub c0546e0e46 Basic CI integration for Nix builds (#1495)
* Skip pushing to cachix for pull requests from forks.
* Build PostgREST first in the nix CI job in order to fail fast
2020-04-25 13:08:30 -05:00
RemoandGitHub d5f1d1b1ad Pin version 0.3 of protolude in nix (#1499) 2020-04-24 12:09:56 -05:00
RemoandGitHub 1c19bbde93 Run tests against several PostgreSQL versions using Nix (#1492)
* Show test output with postgrest-test-spec* in nix-shell

* Test output in color
2020-04-24 11:05:37 -05:00
RemoandSteve Chavez 2e6a094d48 Disable nix pure by default in stack.yaml 2020-04-23 12:48:04 -05:00
RemoandSteve Chavez 178c5d54d5 Integrate stack in the nix-shell environment 2020-04-22 14:30:02 -05:00
RemoandGitHub a7c396e464 Fix and improvements to with_tmp_db (#1488)
* Load fixtures in one psql session

* Add an option to keet the tmp directory and logs.
2020-04-22 11:57:40 -05:00