mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
73 lines
3.6 KiB
YAML
73 lines
3.6 KiB
YAML
language: php
|
|
|
|
env:
|
|
- SETUP_MODE=update
|
|
- SETUP_MODE=install
|
|
|
|
services:
|
|
- mysql
|
|
- redis
|
|
|
|
before_script:
|
|
- rm -f config/services.yml config/connexions.yml config/config.yml config/config.inc config/connexion.inc config/_GV.php config/_GV.php.old
|
|
- node --version
|
|
- npm --version
|
|
- npm install bower-canary mocha-phantomjs@">=2.0 <3.0" recess@">=1.1.0 <1.1.7" uglify-js -g
|
|
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
|
|
- sh -c 'if [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
|
|
- sh -c 'if [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then pecl install redis; fi;'
|
|
- echo 'extension="memcache.so"' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/memcache.ini
|
|
- echo 'extension="memcached.so"' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/memcached.ini
|
|
- composer self-update
|
|
- composer install --dev --prefer-source
|
|
- wget http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz
|
|
- tar xzf sphinx-2.0.6-release.tar.gz
|
|
- sh -c "cd sphinx-2.0.6-release && wget http://snowball.tartarus.org/dist/libstemmer_c.tgz && tar xzf libstemmer_c.tgz && ./configure --with-libstemmer --with-iconv --with-mysql --enable-id64 --quiet && make -j --quiet && sudo make install"
|
|
- sudo mkdir -p /var/sphinx/datas
|
|
- sudo chmod -R 0777 /var/sphinx
|
|
- mysql -e 'create database ab_test;create database db_test; create database ab_unitTests; create database db_unitTests;'
|
|
- sudo mysql -e "GRANT ALL PRIVILEGES ON ab_unitTests.* TO 'phraseaUnitTests'@'localhost' IDENTIFIED BY 'iWvGxPE8' WITH GRANT OPTION"
|
|
- sudo mysql -e "GRANT ALL PRIVILEGES ON db_unitTests.* TO 'phraseaUnitTests'@'localhost' IDENTIFIED BY 'iWvGxPE8' WITH GRANT OPTION"
|
|
- mysql -e 'SET @@global.sql_mode= "";'
|
|
- mysql -e 'SET @@global.wait_timeout= 999999;'
|
|
- git clone git://github.com/alchemy-fr/Phraseanet-Extension.git
|
|
- sh -c "cd Phraseanet-Extension && phpize && ./configure --quiet && make -j --quiet && sudo make install"
|
|
- echo "extension=phrasea2.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
|
- git clone git://github.com/alchemy-fr/Phraseanet-Indexer.git
|
|
- sh -c "cd Phraseanet-Indexer && autoreconf --force --install && ./configure --quiet && make -j --quiet && sudo make install"
|
|
- wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
|
|
- tar -xzf imagick-3.1.0RC2.tgz
|
|
- sh -c "cd imagick-3.1.0RC2 && phpize && ./configure --with-imagick=/usr/local && make -j && sudo make install"
|
|
- echo "extension=imagick.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
|
|
|
notifications:
|
|
irc:
|
|
channels:
|
|
- "irc.freenode.org#phrasea"
|
|
template:
|
|
- "%{repository_url} %{branch} by %{author} (%{commit}) : %{message}"
|
|
- "Build details: %{build_url}"
|
|
use_notice: true
|
|
|
|
php:
|
|
- 5.3
|
|
- 5.4
|
|
- 5.5
|
|
|
|
script:
|
|
- bin/developer dependencies:all --prefer-source
|
|
- sh -c " if [ '$SETUP_MODE' = 'update' ]; then
|
|
cp hudson/connexion.inc config/;
|
|
cp hudson/_GV.php config/;
|
|
mysql -e 'source `pwd`/hudson/fixtures.sql';
|
|
bin/setup system:upgrade -y -v -f;
|
|
fi"
|
|
- sh -c " if [ '$SETUP_MODE' = 'install' ]; then
|
|
bin/setup system:install --email=test@phraseanet.com --password=test --db-user=root --db-template=fr --db-password= --databox=db_test --appbox=ab_test --server-name=http://127.0.0.1 -y;
|
|
fi"
|
|
- php hudson/cleanupSubdefs.php
|
|
- bin/developer assets:compile-less
|
|
- bin/developer assets:build-javascript
|
|
- sh tests/js/run.sh
|
|
- bin/phpunit
|