<commit_before>language: php
sudo: true
dist: xenial

cache:
  pip: true
  directories:
    - ${TRAVIS_BUILD_DIR}/site/vendor
    - ${HOME}/.composer/cache
    - ${HOME}/.cache/pip

# We use build stages (https://docs.travis-ci.com/user/build-stages/) to allow us to
# create a matrix of firstly building and testing various PHP targets in several ways
# (lint, unit test, e2e test) and then test out various C++ compilers to ensure our
# best compatibility.
jobs:
  fast_finish: true

  include:
    # Test if the name of the PR starts with [WIP] and fail at this stage if it does
    - if: type = pull_request
      stage: pr test for wip
      language: python
      python: 3.6
      install:
        - pip3 install requests
      script:
        - echo "Checking title for ${TRAVIS_REPO_SLUG}/pulls/${TRAVIS_PULL_REQUEST}"
        - python3 ${TRAVIS_BUILD_DIR}/.setup/travis/check_wip.py ${TRAVIS_REPO_SLUG} ${TRAVIS_PULL_REQUEST}

    # Warm up the pip and composer caches to use it for the rest of the build stages
    - &00-cache
      stage: 00 warm up cache
      php: 7.2
      before_install: source ${TRAVIS_BUILD_DIR}/.setup/travis/before_install.sh
      install:
        - pushd site
        - travis_retry composer install --prefer-dist --no-interaction
        - popd
        - pip3 install -U pip
        - pip3 install python-pam
        - pip3 install PyYAML
        - pip3 install psycopg2-binary
        - pip3 install sqlalchemy
        - pip3 install pylint_runner
        - pip3 install python-dateutil
        - pip3 install selenium
        - pip3 install pause
        - pip3 install tzlocal
        - pip3 install paramiko
        - pip3 install psutil
        - pip3 install jsonschema
        - pip3 install jsonref
        - pip3 install docker
      script: skip
    - <<: *00-cache
      php: 7.3
      if: branch = master OR type = pull_request

    - &00-python-cache
      language: python
      python: 3.6
      install:
        - pip3 install flake8 flake8-bugbear flake8-docstrings sqlalchemy psycopg2-binary
      script: skip
    - <<: *00-python-cache
      python: 3.7
      if: branch = master OR type = pull_request

    # Lint the codebase to ensure that the code is compliant to our system
    - &01-php-lint
      stage: 01 lint
      php: 7.2
      install:
        - pushd site
        - composer install --prefer-dist --no-interaction
        - popd
      script:
        - pushd site
        - find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
        - vendor/bin/phpcs --standard=tests/ruleset.xml
        - vendor/bin/phpstan analyze app
        - popd
    - <<: *01-php-lint
      php: 7.3
      if: branch = master OR type = pull_request

    - &01-python-lint
      language: python
      python: 3.6
      install:
        - pip3 install flake8 flake8-bugbear flake8-docstrings
      script:<commit_msg>[Testing:Python] Drop usage of flake8-docstrings (#4710)<commit_after>language: php
sudo: true
dist: xenial

cache:
  pip: true
  directories:
    - ${TRAVIS_BUILD_DIR}/site/vendor
    - ${HOME}/.composer/cache
    - ${HOME}/.cache/pip

# We use build stages (https://docs.travis-ci.com/user/build-stages/) to allow us to
# create a matrix of firstly building and testing various PHP targets in several ways
# (lint, unit test, e2e test) and then test out various C++ compilers to ensure our
# best compatibility.
jobs:
  fast_finish: true

  include:
    # Test if the name of the PR starts with [WIP] and fail at this stage if it does
    - if: type = pull_request
      stage: pr test for wip
      language: python
      python: 3.6
      install:
        - pip3 install requests
      script:
        - echo "Checking title for ${TRAVIS_REPO_SLUG}/pulls/${TRAVIS_PULL_REQUEST}"
        - python3 ${TRAVIS_BUILD_DIR}/.setup/travis/check_wip.py ${TRAVIS_REPO_SLUG} ${TRAVIS_PULL_REQUEST}

    # Warm up the pip and composer caches to use it for the rest of the build stages
    - &00-cache
      stage: 00 warm up cache
      php: 7.2
      before_install: source ${TRAVIS_BUILD_DIR}/.setup/travis/before_install.sh
      install:
        - pushd site
        - travis_retry composer install --prefer-dist --no-interaction
        - popd
        - pip3 install -U pip
        - pip3 install python-pam
        - pip3 install PyYAML
        - pip3 install psycopg2-binary
        - pip3 install sqlalchemy
        - pip3 install pylint_runner
        - pip3 install python-dateutil
        - pip3 install selenium
        - pip3 install pause
        - pip3 install tzlocal
        - pip3 install paramiko
        - pip3 install psutil
        - pip3 install jsonschema
        - pip3 install jsonref
        - pip3 install docker
      script: skip
    - <<: *00-cache
      php: 7.3
      if: branch = master OR type = pull_request

    - &00-python-cache
      language: python
      python: 3.6
      install:
        - pip3 install flake8 flake8-bugbear sqlalchemy psycopg2-binary
      script: skip
    - <<: *00-python-cache
      python: 3.7
      if: branch = master OR type = pull_request

    # Lint the codebase to ensure that the code is compliant to our system
    - &01-php-lint
      stage: 01 lint
      php: 7.2
      install:
        - pushd site
        - composer install --prefer-dist --no-interaction
        - popd
      script:
        - pushd site
        - find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
        - vendor/bin/phpcs --standard=tests/ruleset.xml
        - vendor/bin/phpstan analyze app
        - popd
    - <<: *01-php-lint
      php: 7.3
      if: branch = master OR type = pull_request

    - &01-python-lint
      language: python
      python: 3.6
      install:
        - pip3 install flake8 flake8-bugbear
      script:
{'fraction_non_alphanumeric': 0.08730842087136215, 'fraction_numerical': 0.02324780437403134, 'mean_word_length': 1.9738863287250383, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1393808', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1821, 'n_words': 588}