Update Travis conf and js testing

This commit is contained in:
Benoît Burnichon
2015-03-26 15:27:35 +01:00
parent a3f2e39781
commit 0386d5c1e0
3 changed files with 19 additions and 23 deletions

View File

@@ -33,32 +33,35 @@ before_install:
- yes | pecl install imagick - yes | pecl install imagick
install: install:
- npm --version
- travis_retry npm install
- travis_retry composer install --optimize-autoloader --dev --prefer-source - travis_retry composer install --optimize-autoloader --dev --prefer-source
- travis_retry grunt install-assets - travis_retry ./node_modules/.bin/grunt install-assets
- ./bin/developer assets:compile-less - ./bin/developer assets:compile-less
before_script: before_script:
- node --version - >
- npm --version mysql -e '
- travis_retry npm install CREATE DATABASE update39_test;
- mysql -e 'create database update39_test;create database ab_test;create database db_test;' CREATE DATABASE ab_test;
- mysql -e 'SET @@global.sql_mode= STRICT_ALL_TABLES;' CREATE DATABASE db_test;
- mysql -e 'SET @@global.max_allowed_packet= 33554432;' SET @@global.sql_mode= STRICT_ALL_TABLES;
- mysql -e 'SET @@global.wait_timeout= 999999;' SET @@global.max_allowed_packet= 33554432;
SET @@global.wait_timeout= 999999;
script: '
- ./bin/developer system:uninstall - ./bin/developer system:uninstall
- ./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; - ./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;
- mysql -e 'SELECT version FROM ab_test.sitepreff \G'
- mysql -e 'SELECT * FROM db_test.pref WHERE prop = "version" \G'
- > - >
if [ "$SETUP_MODE" = "update" ]; then if [ "$SETUP_MODE" = "update" ]; then
./bin/developer ini:reset --email=test@phraseanet.com --password=test --run-patches --no-setup-dbs; ./bin/developer ini:reset --email=test@phraseanet.com --password=test --run-patches --no-setup-dbs;
php resources/hudson/cleanupSubdefs.php; php resources/hudson/cleanupSubdefs.php;
fi fi
- mysql -e 'SELECT ab.version AS applibox_version, db.value AS databox_version FROM ab_test.sitepreff ab, db_test.pref db WHERE db.prop = "version"'
- ./bin/developer ini:setup-tests-dbs - ./bin/developer ini:setup-tests-dbs
- ./bin/console searchengine:index:create - ./bin/console searchengine:index:create
- ./bin/developer phraseanet:regenerate-sqlite - ./bin/developer phraseanet:regenerate-sqlite
- ./bin/developer phraseanet:generate-js-fixtures - ./bin/developer phraseanet:generate-js-fixtures
script:
- ./node_modules/.bin/grunt test - ./node_modules/.bin/grunt test
- ./bin/phpunit - ./bin/phpunit

View File

@@ -30,14 +30,6 @@ module.exports = function(grunt) {
} }
} }
}, },
shell : {
generate_js_fixtures: {
options: {
stdout: true
},
command : 'bin/developer phraseanet:generate-js-fixtures'
}
},
bower_postinst: { bower_postinst: {
dist: { dist: {
options: { options: {
@@ -439,5 +431,6 @@ module.exports = function(grunt) {
"copy-assets", "copy-assets",
"clean:bower" "clean:bower"
]); ]);
grunt.registerTask('test', ["shell:generate_js_fixtures", "qunit", "mocha_phantomjs"]); // js fixtures should be present (./bin/developer phraseanet:generate-js-fixtures)
}; grunt.registerTask('test', ["qunit", "mocha_phantomjs"]);
};

2
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "3ecc359e45901eca385f83233299d840", "hash": "92474e976576454608ed9d95a2bd5362",
"packages": [ "packages": [
{ {
"name": "alchemy-fr/tcpdf-clone", "name": "alchemy-fr/tcpdf-clone",