<commit_before>language: php

php:
  - 5.3
  - 5.4

branches:
    only:
        - develop
        - release/1.4

notifications:
  email:
    - <EMAIL>

env: 
  global:
  # SauceLabs credentials
  - secure: "<KEY>
  - secure: "<KEY>

before_script:

  # SauceLabs Connect
  - curl https://gist.github.com/everzet/5698159/raw/sauce_connect_setup.sh | bash

  # Apache + PHP
  - sudo apt-get update
  - sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql
  - sudo a2enmod rewrite
  - sudo sed -i -e "s,/var/www,$(pwd),g" /etc/apache2/sites-available/default
  - sudo sed -i -e "s,AllowOverride None,AllowOverride All,g" /etc/apache2/sites-available/default
  - sudo /etc/init.d/apache2 restart

  # MySQL
  - echo -e "[mysqld]\nlower_case_table_names = 1" > lowercase_tables.cnf
  - sudo mv lowercase_tables.cnf /etc/mysql/conf.d/
  - sudo /etc/init.d/mysql restart

  # Composer
  - curl http://getcomposer.org/installer | php
  - php composer.phar install --dev --prefer-source

  # Application
  - mkdir -p protected/runtime
  - chmod -R 0777 protected/runtime assets
  - cp protected/config/local/common.travis.php protected/config/local/common.php
  - cp index.example.php index.php
  - cp .htaccess.sample .htaccess
  - mysql -e 'create database openeyes;'
  - echo -e "OphCiExamination\nOphDrPrescription\nOphTrOperationbooking\nOphTrOperationnote\nOphTrConsent\nOphCiPhasing\nOphLeEpatientletter\nOphCoCorrespondence\neyedraw" > .enabled-modules
  - bin/clone-modules.sh $TRAVIS_BRANCH

  # Check everything migrates ok and then reset database
  - bin/migrate-all.sh
  - mysql -e 'drop database openeyes; create database openeyes;'

  # Load test data
  - cat features/testdata.sql | mysql openeyes
 
script: bin/behat -p ci
<commit_msg>CI tweaks<commit_after>language: php

php:
  - 5.3
  - 5.4

branches:
    only:
        - develop
        - release/1.4

notifications:
  email:
    - <EMAIL>

env: 
  global:
  # SauceLabs credentials
  - secure: "<KEY>
  - secure: "<KEY>

before_script:

  # SauceLabs Connect
  - curl https://gist.github.com/everzet/5698159/raw/sauce_connect_setup.sh | bash

  # Apache + PHP
  - sudo apt-get update
  - sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql
  - sudo a2enmod rewrite
  - sudo sed -i -e "s,/var/www,$(pwd),g" /etc/apache2/sites-available/default
  - sudo sed -i -e "s,AllowOverride None,AllowOverride All,g" /etc/apache2/sites-available/default
  - sudo /etc/init.d/apache2 restart

  # MySQL
  - echo -e "[mysqld]\nlower_case_table_names = 1" > lowercase_tables.cnf
  - sudo mv lowercase_tables.cnf /etc/mysql/conf.d/
  - sudo /etc/init.d/mysql restart

  # Composer
  - curl http://getcomposer.org/installer | php
  - php composer.phar install --dev --prefer-source

  # Application
  - mkdir -p protected/runtime
  - chmod -R 0777 protected/runtime assets
  - cp protected/config/local/common.travis.php protected/config/local/common.php
  - cp index.example.php index.php
  - cp .htaccess.sample .htaccess
  - echo -e "OphCiExamination\nOphDrPrescription\nOphTrOperationbooking\nOphTrOperationnote\nOphTrConsent\nOphCiPhasing\nOphLeEpatientletter\nOphCoCorrespondence\neyedraw" > .enabled-modules
  - bin/clone-modules.sh $TRAVIS_BRANCH

  # Initialise database and check migrations
  - mysql -e 'create database openeyes;'
  - bin/migrate-all.sh
  - mysql -e 'drop database openeyes;'

  # Initialise test data
  - mysql -e 'create database openeyes;'
  - cat features/testdata.sql | mysql openeyes
  - bin/migrate-all.sh

script: bin/behat -p ci

{'fraction_non_alphanumeric': 0.11695248805172899, 'fraction_numerical': 0.014619061006466124, 'mean_word_length': 3.04778156996587, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1292111', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1299, 'n_words': 277}