<commit_before>language: perl
perl:
    - "5.16"
addons:
    hosts:
        - mediacloud.local
# Don't run dependency modules' unit tests because in that case the whole build
# will take more than 40 minutes, and we want to spend that time running
# Media Cloud's unit tests
env: PERL_CPANM_OPT="--notest --force --skip-satisfied"
before_install:
    # Update package listings (don't upgrade the packages though because it takes too much time)
    - sudo apt-get -y update
    # Create + switch to the Media Cloud's Perlbrew library
    - perlbrew lib create mediacloud
    - perlbrew switch @mediacloud
    # Install Media Cloud system package dependencies
    - ./install_scripts/install_mediacloud_package_dependencies.sh
    - ./install_modules_outside_of_carton.sh
    - ./install_modules_with_carton.sh
    - ./python_scripts/pip_installs.sh
install:
    # Use default configuration
    - cp mediawords.yml.dist mediawords.yml
    # Create PostgreSQL database
    - sudo ./install_scripts/create_default_db_user_and_databases.sh
before_script:
    # Initialize PostgreSQL database
    - MEDIAWORDS_CREATE_DB_DO_NOT_CONFIRM=1 ./script/run_with_carton.sh ./script/mediawords_create_db.pl
script:
    # Run Media Cloud's test suite
    - ./script/run_test_suite.sh
after_failure:
    # Print out cpanminus build logs, maybe they have failed
    - echo "cpanminus build logs:"
    - echo "---"
    - find ~/.cpanm/ -name build.log -exec printf "\n\n\n\n" \; -exec echo Build file {} \; -exec echo "---" \; -exec cat {} \;<commit_msg>Remove "after_failure" section because it only works if the "script" section fails<commit_after>language: perl
perl:
    - "5.16"
addons:
    hosts:
        - mediacloud.local
# Don't run dependency modules' unit tests because in that case the whole build
# will take more than 40 minutes, and we want to spend that time running
# Media Cloud's unit tests
env: PERL_CPANM_OPT="--notest --force --skip-satisfied"
before_install:
    # Update package listings (don't upgrade the packages though because it takes too much time)
    - sudo apt-get -y update
    # Create + switch to the Media Cloud's Perlbrew library
    - perlbrew lib create mediacloud
    - perlbrew switch @mediacloud
    # Install Media Cloud system package dependencies
    - ./install_scripts/install_mediacloud_package_dependencies.sh
    - ./install_modules_outside_of_carton.sh
    - ./install_modules_with_carton.sh
    - ./python_scripts/pip_installs.sh
install:
    # Use default configuration
    - cp mediawords.yml.dist mediawords.yml
    # Create PostgreSQL database
    - sudo ./install_scripts/create_default_db_user_and_databases.sh
before_script:
    # Initialize PostgreSQL database
    - MEDIAWORDS_CREATE_DB_DO_NOT_CONFIRM=1 ./script/run_with_carton.sh ./script/mediawords_create_db.pl
script:
    # Run Media Cloud's test suite
    - ./script/run_test_suite.sh
{'fraction_non_alphanumeric': 0.08428720083246619, 'fraction_numerical': 0.004162330905306972, 'mean_word_length': 3.3963414634146343, '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': '6143810', 'n_tokens_mistral': 909, 'n_tokens_neox': 864, 'n_words': 265}