Skip to content

Commit

Permalink
Run update tests only once
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Dec 15, 2017
1 parent a6c4789 commit 50ad175
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ before_script:
- rm -f composer.lock
- composer install --optimize-autoloader
#install 0.72.3 database
- mysql -u root -e 'create database glpitest0723;'
- mysql -u root glpitest0723 < tests/glpi-0.72.3-empty.sql
- cp tests/travis.config_db.php tests/config_db.php
- php tools/cliupdate.php --config-dir=../tests --dev
- rm tests/config_db.php
- if [[ "$UPDATE" == "true" ]]; then mysql -u root -e 'create database glpitest0723;'; fi
- if [[ "$UPDATE" == "true" ]]; then mysql -u root glpitest0723 < tests/glpi-0.72.3-empty.sql; fi
- if [[ "$UPDATE" == "true" ]]; then cp tests/travis.config_db.php tests/config_db.php; fi
- if [[ "$UPDATE" == "true" ]]; then php tools/cliupdate.php --config-dir=../tests --dev; fi
- if [[ "$UPDATE" == "true" ]]; then rm tests/config_db.php; fi
- mysql -u root -e 'create database glpitest;'
- php tools/cliinstall.php --db=glpitest --user=root --tests
- php tools/cliupdate.php --config-dir=../tests |grep -q "No migration needed." || (echo "tools/cliupdate.php FAILED" && exit 1)
Expand All @@ -25,7 +25,7 @@ before_script:
- phpenv config-add tests/enable-apcu.ini
script:
- mysql -u root -e 'select version();'
- composer testdb
- if [[ "$UPDATE" == "true" ]]; then composer testdb; fi
- composer test
- composer testweb
- if [[ "$LDAP" == "true" ]]; then composer testldap; fi
Expand All @@ -36,6 +36,7 @@ matrix:
include:
- php: 5.6
- php: 7.0
env: UPDATE=true
addons:
mariadb: 10.0
- php: 7.1
Expand Down

0 comments on commit 50ad175

Please sign in to comment.