Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/light tests #3306

Merged
merged 3 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 12 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,56 @@
dist: precise
language: php

env:
- DB=mysql

before_script:
- ./tests/LDAP/ldap_run.sh
- if [[ "$LDAP" == "true" ]]; then ./tests/LDAP/ldap_run.sh; fi
- composer self-update
- sed -e '/"php":/d' -i composer.json
- 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)
- php -S localhost:8088 tests/router.php &>/dev/null &
# LDAP stuff
- phpenv config-add tests/enable-ldap.ini
- ./tests/LDAP/ldap_fixtures.sh > /dev/null
- if [[ "$LDAP" == "true" ]]; then ./tests/LDAP/ldap_fixtures.sh > /dev/null; fi
#APCu
- 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
- composer testldap
- if [[ "$LDAP" == "true" ]]; then composer testldap; fi
- if [[ "$CS" == "true" ]]; then composer cs; fi

#note: default maria version is 5.5 for all main php versions list exept nightly
matrix:
include:
- php: 5.6
addons:
apt:
packages:
- ldap-utils
- slapd
- php: 7.0
addons:
apt:
packages:
- ldap-utils
- slapd
- php: 7.1
env: UPDATE=true
addons:
mariadb: 10.0
apt:
packages:
- ldap-utils
- slapd
- php: 7.1
addons:
mariadb: 10.1
apt:
packages:
- ldap-utils
- slapd
- php: 7.1
env: CS=true
addons:
apt:
packages:
- ldap-utils
- slapd
mariadb: 10.1
- php: 7.2
env: LDAP=true
addons:
apt:
packages:
- ldap-utils
- slapd
- php: nightly
addons:
apt:
packages:
- ldap-utils
- slapd
allow_failures:
- php: nightly

Expand Down
1 change: 0 additions & 1 deletion tests/enable-ldap.ini

This file was deleted.