<commit_before>services:
  - docker

before_script:
  - docker-compose up -d

script:
  - docker-compose run --rm scorecard python manage.py test municipal_finance scorecard

after_script:
  - docker-compose down<commit_msg>Build static assets and add smoke test to CI build<commit_after>services:
  - docker

before_script:
  # Start dependencies and initialise dev DB which we'll later use for demodata fixture check
  - docker-compose run --rm scorecard bin/wait-for-postgres.sh python manage.py migrate
  - docker-compose run --rm web yarn build
  - docker-compose run --rm web python manage.py collectstatic --no-input


script:
  - docker-compose run --rm scorecard python manage.py test municipal_finance scorecard

  # Ensure that the demodata fixture can be loaded and the data is available in the API
  # - smoke test
  # - ensure development environment setup is maintained.
  - docker-compose run --rm web bin/wait-for-postgres.sh python manage.py loaddata demo-data
  - docker-compose up -d
  - wget --retry-connrefused --waitretry=1 --read-timeout=10 --timeout=10 --tries=10 -O-  "http://localhost:8001/profiles/municipality-TSH-city-of-tshwane/" | grep "Gauteng"

after_script:
  # Log DB output in case issues occurred where this can help us debug quicly
  - docker-compose logs db
{'fraction_non_alphanumeric': 0.08558211256746338, 'fraction_numerical': 0.008481110254433308, 'mean_word_length': 3.5384615384615383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4954233', 'n_tokens_mistral': 416, 'n_tokens_neox': 393, 'n_words': 140}