<commit_before>dependencies:
  cache_directories:
    - "~/.stack"
    - ".stack-work"
  pre:
    - curl -L https://github.com/commercialhaskell/stack/releases/download/v1.0.2/stack-1.0.2-linux-x86_64.tar.gz | tar zx -C /tmp
    - sudo mv /tmp/stack-1.0.2-linux-x86_64/stack /usr/bin
    - createuser --superuser --no-password postgrest_test
    - createdb -O postgrest_test -U ubuntu postgrest_test
  override:
    - stack setup
    - stack install hlint packdeps cabal-install
    - rm -fr $(stack path --dist-dir)
    - stack build
    - stack build --test --no-run-tests

test:
  override:
    - stack test
    - git ls-files | grep '\.l\?hs$' | xargs stack exec -- hlint -X QuasiQuotes "$@"<commit_msg>Ensure helper binaries get re-installed<commit_after>dependencies:
  cache_directories:
    - "~/.stack"
    - ".stack-work"
  pre:
    - curl -L https://github.com/commercialhaskell/stack/releases/download/v1.0.2/stack-1.0.2-linux-x86_64.tar.gz | tar zx -C /tmp
    - sudo mv /tmp/stack-1.0.2-linux-x86_64/stack /usr/bin
    - createuser --superuser --no-password postgrest_test
    - createdb -O postgrest_test -U ubuntu postgrest_test
  override:
    - stack setup
    - rm -fr $(stack path --dist-dir) $(stack path --local-install-root)
    - stack install hlint packdeps cabal-install
    - stack build
    - stack build --test --no-run-tests

test:
  override:
    - stack test
    - git ls-files | grep '\.l\?hs$' | xargs stack exec -- hlint -X QuasiQuotes "$@"
{'fraction_non_alphanumeric': 0.14372881355932204, 'fraction_numerical': 0.02305084745762712, 'mean_word_length': 2.4087759815242493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5055937', 'n_tokens_mistral': 568, 'n_tokens_neox': 534, 'n_words': 125}