<commit_before>dist: trusty
sudo: false

branches:
  except:
  - /^dependabot\/.*$/

cache:
  pip: true
  yarn: true

env:
  global:
    # See https://git.io/vdao3 for details.
    - JOBS=1

    # Percy secrets are included here to enable Percy's GitHub integration
    # on community-submitted PRs
    - PERCY_PROJECT=skylines/skylines
    - PERCY_TOKEN=<KEY>

jobs:
  fast_finish: true
  allow_failures:
    - python: 3.4

  include:
    - &backend-test
      stage: test
      env: NAME=backend      # used only to make Travis UI show description

      language: python
      python: 2.7

      addons:
        postgresql: "9.5"
        apt:
          packages:
            - postgresql-9.5-postgis-2.3

      services:
        - postgresql
        - redis

      before_install:
        - pip install pipenv==2018.7.1

      install:
        - pipenv install --dev

      before_script:
        # Create the testing database
        - psql -U postgres -c 'CREATE DATABASE skylines_test;'

        # Install PostGIS extension into the database
        - psql -U postgres -d skylines_test -c 'CREATE EXTENSION postgis;'

        # Install fuzzystrmatch extension into the database
        - psql -U postgres -d skylines_test -c 'CREATE EXTENSION fuzzystrmatch;'

      script:
        # Run the test suite
        - pipenv run py.test -vv --color=yes --cov=skylines --cov-report term-missing:skip-covered

    - <<: *backend-test
      python: 3.4

    - stage: test
      env: NAME=black         # used only to make Travis UI show description

      language: python
      python: 3.6

      install:
        - pip install black==18.9b0

      script:
        - black config migrations skylines tests uwsgi *.py --check

    - stage: test
      env: NAME=frontend      # used only to make Travis UI show description

      language: node_js
      node_js: 10

      addons:
        chrome: stable

      before_install:
        - cd ember

        - curl -o- -L https://yarnpkg.com/install.sh | bash
        - export PATH=$HOME/.yarn/bin:$PATH
        - yarn global add bower

      install:
        - yarn install
        - bower install

      script:
        - yarn test
<commit_msg>CI: Ensure that Python 3.4 test suite stays green too<commit_after>dist: trusty
sudo: false

branches:
  except:
  - /^dependabot\/.*$/

cache:
  pip: true
  yarn: true

env:
  global:
    # See https://git.io/vdao3 for details.
    - JOBS=1

    # Percy secrets are included here to enable Percy's GitHub integration
    # on community-submitted PRs
    - PERCY_PROJECT=skylines/skylines
    - PERCY_TOKEN=<KEY>

jobs:
  fast_finish: true

  include:
    - &backend-test
      stage: test
      env: NAME=backend      # used only to make Travis UI show description

      language: python
      python: 2.7

      addons:
        postgresql: "9.5"
        apt:
          packages:
            - postgresql-9.5-postgis-2.3

      services:
        - postgresql
        - redis

      before_install:
        - pip install pipenv==2018.7.1

      install:
        - pipenv install --dev

      before_script:
        # Create the testing database
        - psql -U postgres -c 'CREATE DATABASE skylines_test;'

        # Install PostGIS extension into the database
        - psql -U postgres -d skylines_test -c 'CREATE EXTENSION postgis;'

        # Install fuzzystrmatch extension into the database
        - psql -U postgres -d skylines_test -c 'CREATE EXTENSION fuzzystrmatch;'

      script:
        # Run the test suite
        - pipenv run py.test -vv --color=yes --cov=skylines --cov-report term-missing:skip-covered

    - <<: *backend-test
      python: 3.4

    - stage: test
      env: NAME=black         # used only to make Travis UI show description

      language: python
      python: 3.6

      install:
        - pip install black==18.9b0

      script:
        - black config migrations skylines tests uwsgi *.py --check

    - stage: test
      env: NAME=frontend      # used only to make Travis UI show description

      language: node_js
      node_js: 10

      addons:
        chrome: stable

      before_install:
        - cd ember

        - curl -o- -L https://yarnpkg.com/install.sh | bash
        - export PATH=$HOME/.yarn/bin:$PATH
        - yarn global add bower

      install:
        - yarn install
        - bower install

      script:
        - yarn test

{'fraction_non_alphanumeric': 0.08531021897810219, 'fraction_numerical': 0.012773722627737226, 'mean_word_length': 1.7841269841269842, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '1615399', 'n_tokens_mistral': 1454, 'n_tokens_neox': 1346, 'n_words': 412}