From b7f20c0f36dd6e0ed65ca93fcec44aa23f2fa203 Mon Sep 17 00:00:00 2001 From: Daniel Schaal Date: Tue, 6 Jun 2017 18:20:20 +0200 Subject: Fix travis build (#178) * Use stable12 branch for travis * Shorten db indices to max 27 characters to satisfy app:check-code * Use precise container, downgrade to psql 9.4 * Create psql role * Fix ContentController test * Fix PageController and StatusService tests * Use OCP\IDBConnection, OCP\IDb was removed * Extend IntegrationTest from \Test\Testcase, use loginAsUser to login * Require phpunit 5, nextcloud tests not compatible with phpunit 6 Change tests to use phpunit from vendor directory --- .travis.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 565da4cd1..66f0b0ffd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ sudo: false +dist: precise language: php php: - 5.6 @@ -7,7 +8,7 @@ php: env: global: - - CORE_BRANCH=stable11 + - CORE_BRANCH=stable12 matrix: - DB=pgsql @@ -37,14 +38,15 @@ before_install: - mv news nextcloud/apps/ before_script: - - if [[ "$DB" == 'pgsql' ]]; then psql -c 'create database oc_autotest;' -U postgres; fi + - if [[ "$DB" == 'pgsql' ]]; then psql -c "CREATE ROLE oc_autotest LOGIN PASSWORD 'oc_autotest'" -U postgres; fi + - if [[ "$DB" == 'pgsql' ]]; then psql -c "CREATE DATABASE oc_autotest OWNER oc_autotest;" -U postgres; fi - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE oc_autotest;'; fi - - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi + - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'oc_autotest';"; fi - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "GRANT ALL ON oc_autotest.* TO 'oc_autotest'@'localhost';"; fi # fill nextcloud with default configs and enable news - cd nextcloud - mkdir data - - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass='' + - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass="oc_autotest" - ./occ app:enable news - ./occ app:check-code news - ./occ background:cron # enable default cron @@ -59,8 +61,7 @@ after_failure: addons: firefox: "latest" - postgresql: "9.5" + postgresql: "9.4" services: - - mysql - - postgresql + - mysql \ No newline at end of file -- cgit v1.2.3