<commit_before>language: php
php:
  - 5.4
  - 5.5

env:
  - DB=sqlite
  - DB=postgresql
  - DB=mysql

before_install:
  - sudo add-apt-repository -y ppa:chris-lea/node.js
  - sudo apt-get update
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"


install:
  - cd ..
  - sudo apt-get -y install nodejs python3-jinja2 python3-setuptools apache2 chromium-browser libapache2-mod-fastcgi php5-gd php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-imagick
  - sudo easy_install3 pip
  - sudo pip3 install ocdev
  - npm -g install grunt-cli protractor
  - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
  - tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
  - sudo ln -s $(pwd)/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
  - ocdev setup core --dir owncloud
  - mv news owncloud/apps/
  - cd owncloud

before_script:
  - createuser -U travis -s oc_autotest
  - mysql -e 'create database oc_autotest;'
  - mysql -u root -e "CREATE USER 'oc_autotest'@'localhost'";
  - mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost'";
  - ocdev ci $DB
  - cd apps/news
  #- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
  #- sudo a2enmod rewrite actions fastcgi alias
  #- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  #- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
  #- sudo cp -f tests/travis/travis-ci-apache /etc/apache2/sites-available/default
  #- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
  #- sudo service apache2 restart  

script:
  - phpunit --coverage-clover=coverage.clover tests/unit
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
  - cd js/
  - npm install --deps
  - npm test
  - sudo webdriver-manager update
  #- sudo chown -R www-data:www-data ../../data
  #- sudo chown -R www-data:www-data ../../config
  #- grunt e2e

addons:
  postgresql: "9.3"<commit_msg>try without grunt-cli<commit_after>language: php
php:
  - 5.4
  - 5.5

env:
  - DB=sqlite
  - DB=postgresql
  - DB=mysql

before_install:
  - sudo add-apt-repository -y ppa:chris-lea/node.js
  - sudo apt-get update
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"

install:
  - cd ..
  - sudo apt-get -y install nodejs python3-jinja2 python3-setuptools apache2 chromium-browser libapache2-mod-fastcgi php5-gd php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-imagick
  - sudo easy_install3 pip
  - sudo pip3 install ocdev
  - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
  - tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
  - sudo ln -s $(pwd)/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
  - ocdev setup core --dir owncloud
  - mv news owncloud/apps/

before_script:
  - createuser -U travis -s oc_autotest
  - mysql -e 'create database oc_autotest;'
  - mysql -u root -e "CREATE USER 'oc_autotest'@'localhost'";
  - mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost'";
  # FIXME: apache setup needs to work that the directory above is served from
  #        httpd
  #- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
  #- sudo a2enmod rewrite actions fastcgi alias
  #- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  #- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
  #- sudo cp -f tests/travis/travis-ci-apache /etc/apache2/sites-available/default
  #- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
  #- sudo service apache2 restart  
  - cd owncloud
  - ocdev ci $DB
  - cd apps/news

script:
  - phpunit --coverage-clover=coverage.clover tests/unit
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
  - cd js/
  - npm install --deps
  - npm test
  - sudo npm install -g protractor
  - sudo webdriver-manager update
  - sudo chown -R www-data:www-data ../../../data
  - sudo chown -R www-data:www-data ../../../config
  #- grunt e2e

addons:
  postgresql: "9.3"
{'fraction_non_alphanumeric': 0.14656119534168316, 'fraction_numerical': 0.02812568666227203, 'mean_word_length': 2.927523727351165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3037978', 'n_tokens_mistral': 1933, 'n_tokens_neox': 1786, 'n_words': 385}