<commit_before>before_script:
  - export APP_MIGRATION_LOOKUP=@root/tests/codeception/_migrations
  - export COMPOSE_PROJECT_NAME=buildref${CI_BUILD_REF}
  - export TEST_IMAGE_PREFIX=buildref${CI_BUILD_REF}
  - export COMPOSE_HTTP_TIMEOUT=120
  - export HOST_APP_VOLUME=$CI_PROJECT_DIR
  - export IMAGE_NAME=phundament/app
  - mkdir -p tmp

stages:
  - build
  - test_pre
  - test
  - report
  - cleanup
  - deploy

build:
  stage: build
  script:
      - bash build/scripts/build.sh

test:
  stage: test
  script:
      - export COMPOSE_PROJECT_NAME=buildref${CI_BUILD_REF}${CI_BUILD_NAME}
      - bash build/scripts/${CI_BUILD_NAME}.sh || EXIT_CODE=$?; cp -r tests/codeception/_output/ /tmp/${CI_BUILD_NAME}-${CI_BUILD_REF}; exit ${EXIT_CODE}

test-allow_failure:
  stage: test_pre
  script:
      - export COMPOSE_PROJECT_NAME=buildref${CI_BUILD_REF}${CI_BUILD_NAME}
      - set +e
      - bash build/scripts/${CI_BUILD_NAME}.sh || EXIT_CODE=$?
      - set -e
      - cp -r tests/codeception/_output/ /tmp/${CI_BUILD_NAME}-${CI_BUILD_REF}
      - exit ${EXIT_CODE}
  allow_failure: true
  only:
      - develop

system:
  stage: test
  script:
      - bash build/scripts/system.sh
  allow_failure: true

report:
  stage: report
  script:
    - sleep 5 # waiting for copy
    - ls -lat /tmp
  artifacts:
    paths:
      - /tmp/test-${CI_BUILD_REF}
      - /tmp/test-allow_failure-${CI_BUILD_REF}
  when: always

cleanup:
  stage: cleanup
  script:
    - make TEST clean
    - export COMPOSE_PROJECT_NAME="buildref${CI_BUILD_REF}test"
    - make TEST clean
    - export COMPOSE_PROJECT_NAME="buildref${CI_BUILD_REF}test-allow_failure"
    - make TEST clean
    - rm -rf /tmp/test-${CI_BUILD_REF}
    - rm -rf /tmp/test-allow_failure-${CI_BUILD_REF}
  when: always

deploy:
  stage: deploy
  script:
      - bash build/scripts/deploy.sh
  only:
      - master
      - /^[0-9]+\.[0-9]+.*$/
<commit_msg>updated comment<commit_after>before_script:
  - export APP_MIGRATION_LOOKUP=@root/tests/codeception/_migrations
  - export COMPOSE_PROJECT_NAME=buildref${CI_BUILD_REF}
  - export TEST_IMAGE_PREFIX=buildref${CI_BUILD_REF}
  - export COMPOSE_HTTP_TIMEOUT=120
  - export HOST_APP_VOLUME=$CI_PROJECT_DIR
  - export IMAGE_NAME=phundament/app
  - mkdir -p tmp

stages:
  - build
  - test_pre
  - test
  - report
  - cleanup
  - deploy

build:
  stage: build
  script:
      - bash build/scripts/build.sh

test:
  stage: test
  script:
      - export COMPOSE_PROJECT_NAME=buildref${CI_BUILD_REF}${CI_BUILD_NAME}
      - bash build/scripts/${CI_BUILD_NAME}.sh || EXIT_CODE=$?; cp -r tests/codeception/_output/ /tmp/${CI_BUILD_NAME}-${CI_BUILD_REF}; exit ${EXIT_CODE}

test-allow_failure:
  stage: test_pre
  script:
      - export COMPOSE_PROJECT_NAME=buildref${CI_BUILD_REF}${CI_BUILD_NAME}
      - set +e
      - bash build/scripts/${CI_BUILD_NAME}.sh || EXIT_CODE=$?
      - set -e
      - cp -r tests/codeception/_output/ /tmp/${CI_BUILD_NAME}-${CI_BUILD_REF}
      - exit ${EXIT_CODE}
  allow_failure: true
  only:
      - develop

system:
  stage: test
  script:
      - bash build/scripts/system.sh
  allow_failure: true

report:
  stage: report
  script:
    - sleep 5 # waiting for copy task
    - ls -lat /tmp
  artifacts:
    paths:
      - /tmp/test-${CI_BUILD_REF}
      - /tmp/test-allow_failure-${CI_BUILD_REF}
  when: always

cleanup:
  stage: cleanup
  script:
    - make TEST clean
    - export COMPOSE_PROJECT_NAME="buildref${CI_BUILD_REF}test"
    - make TEST clean
    - export COMPOSE_PROJECT_NAME="buildref${CI_BUILD_REF}test-allow_failure"
    - make TEST clean
    - rm -rf /tmp/test-${CI_BUILD_REF}
    - rm -rf /tmp/test-allow_failure-${CI_BUILD_REF}
  when: always

deploy:
  stage: deploy
  script:
      - bash build/scripts/deploy.sh
  only:
      - master
      - /^[0-9]+\.[0-9]+.*$/

{'fraction_non_alphanumeric': 0.1222776174232485, 'fraction_numerical': 0.004198373130411965, 'mean_word_length': 2.9584631360332296, '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': '293335', 'n_tokens_mistral': 1441, 'n_tokens_neox': 1418, 'n_words': 256}