travis-ci testing...

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2018-11-26 20:00:40 +01:00
parent eab88abd54
commit 4dca2d6217
No known key found for this signature in database
GPG Key ID: 55284EC83A4823B8
2 changed files with 65 additions and 4 deletions

56
.travis.yml Normal file
View File

@ -0,0 +1,56 @@
language: php
php:
- "5.4"
- "5.6"
# - "7.0"
# - "7.1"
# - "7.2"
branches:
only:
master
matrix:
include:
- php: 5.6
env: deps=highest
- php: 5.4
env: deps=lowest
mysql:
database: froxlor010
username: root
encoding: utf8
before_install:
- sudo apt-get install -y --force-yes php5-mysql php5-xml php5-zip php5-curl php5-bcmath php5-mbstring php5-json
addons:
apt:
update: true
install:
- composer install
service:
- mysql
before_script:
- mysql -e 'CREATE DATABASE IF NOT EXISTS froxlor010'
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('fr0xl0r.TravisCI') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
- mysql -u root -pfr0xl0r.TravisCI < install/froxlor.sql
- mysql -u root -e 'CREATE USER 'froxlor010'@'localhost' IDENTIFIED BY 'fr0xl0r.TravisCI';'
- mysql -u root -e 'GRANT ALL ON froxlor010.* TO 'froxlor010'@'localhost';'
script:
- ant full-build-parallel
-Dpdepend=$(pwd)/vendor/bin/pdepend
-Dphpmd=$(pwd)/vendor/bin/phpmd
-Dphpcpd=$(pwd)/vendor/bin/phpcpd
-Dphpcs=$(pwd)/vendor/bin/phpcs
-Dphploc=$(pwd)/vendor/bin/phploc
-Dphpdox=$(pwd)/vendor/bin/phpdox
-Dphpunit=phpunit
notifications:
irc: "irc.freenode.org#froxlor"

View File

@ -1,9 +1,14 @@
<?php <?php
if (! file_exists('/etc/froxlor-test.pwd') || ! file_exists('/etc/froxlor-test.rpwd')) {
die('This is not the test-system...' . PHP_EOL); if (file_exists('/etc/froxlor-test.pwd') && file_exists('/etc/froxlor-test.rpwd')) {
// froxlor jenkins test-system
$pwd = trim(file_get_contents('/etc/froxlor-test.pwd'));
$rpwd = trim(file_get_contents('/etc/froxlor-test.rpwd'));
} else {
// travis-ci.org
$pwd = 'fr0xl0r.TravisCI';
$rpwd = 'fr0xl0r.TravisCI';
} }
$pwd = trim(file_get_contents('/etc/froxlor-test.pwd'));
$rpwd = trim(file_get_contents('/etc/froxlor-test.rpwd'));
$userdata_content = "<?php $userdata_content = "<?php
\$sql['user'] = 'froxlor010'; \$sql['user'] = 'froxlor010';