<commit_before>language: php

php:
  - 5.2
  - 5.3
  - 5.4

env:
  - CAKE_VERSION=2.1.5 DB=mysql
  - CAKE_VERSION=master DB=mysql
  - CAKE_VERSION=2.3 DB=mysql

before_script:
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
  - git clone --depth 1 git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
  - cp -R ../sanction app/Plugin/Sanction
  - echo "<?php
    class DATABASE_CONFIG {
    public \$default = array(
      'datasource' => 'Database/Mysql',
      'persistent' => false,
      'host' => '0.0.0.0',
      'login' => 'root',
      'password' => '',
      'database' => 'cakephp_test',
      'prefix' => ''
    );
    public \$test = array(
      'datasource' => 'Database/Mysql',
      'persistent' => false,
      'host' => '0.0.0.0',
      'login' => 'root',
      'password' => '',
      'database' => 'cakephp_test',
      'prefix' => '',
      'encoding' => 'utf8'
    );
    }" > ./app/Config/database.php

script:
  - ./app/Console/cake test Sanction Controller/Component/Permit --stderr
<commit_msg>Build only against 5.4<commit_after>language: php

php:
  - 5.4

env:
  - CAKE_VERSION=2.1.5 DB=mysql
  - CAKE_VERSION=master DB=mysql
  - CAKE_VERSION=2.3 DB=mysql

before_script:
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
  - git clone --depth 1 git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
  - cp -R ../sanction app/Plugin/Sanction
  - echo "<?php
    class DATABASE_CONFIG {
    public \$default = array(
      'datasource' => 'Database/Mysql',
      'persistent' => false,
      'host' => '0.0.0.0',
      'login' => 'root',
      'password' => '',
      'database' => 'cakephp_test',
      'prefix' => ''
    );
    public \$test = array(
      'datasource' => 'Database/Mysql',
      'persistent' => false,
      'host' => '0.0.0.0',
      'login' => 'root',
      'password' => '',
      'database' => 'cakephp_test',
      'prefix' => '',
      'encoding' => 'utf8'
    );
    }" > ./app/Config/database.php

script:
  - ./app/Console/cake test Sanction Controller/Component/Permit --stderr

{'fraction_non_alphanumeric': 0.19267734553775745, 'fraction_numerical': 0.018306636155606407, 'mean_word_length': 2.3786707882534777, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '3889228', 'n_tokens_mistral': 839, 'n_tokens_neox': 797, 'n_words': 169}