Drop travis integration

This commit is contained in:
Johannes Meyer 2023-08-30 17:31:38 +02:00
parent 629297116b
commit 8d0c8515da
4 changed files with 0 additions and 149 deletions

View File

@ -1,42 +0,0 @@
language: php
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4snapshot'
- nightly
services:
- mysql
- postgresql
#cache:
# directories:
# - vendor
matrix:
fast_finish: true
include:
- env: CHECK=phpcs
php: nightly # Note: will be allowed failure
- env: CHECK=phpcs
php: '7.0'
- env: CHECK=phpcs
php: '5.6'
allow_failures:
- php: nightly
env:
- CHECK=phpunit DB=mysql DIRECTOR_TESTDB_RES="Director MySQL TestDB" DIRECTOR_TESTDB="director_test"
- CHECK=phpunit DB=pgsql DIRECTOR_TESTDB_RES="Director PostgreSQL TestDB" DIRECTOR_TESTDB="director_test"
DIRECTOR_TESTDB_USER="director_test"
before_script:
- ./test/setup_vendor.sh
- '[ "$CHECK" != phpunit ] || ./test/travis-prepare.sh'
script:
- '[ "$CHECK" != phpcs ] || php vendor/phpcs.phar'
- '[ "$CHECK" != phpunit ] || php vendor/phpunit.phar --testdox || php vendor/phpunit.phar --verbose'

View File

@ -12,17 +12,6 @@ there is probably already someone running them from time to time. So, just
lean back with full trust in our development toolchain and spend your time lean back with full trust in our development toolchain and spend your time
elsewhere ;-) Cheers! elsewhere ;-) Cheers!
### Tests on Travis-CI
When pushing to [GitHub](https://github.com/Icinga/icingaweb2-module-director/)
or sending pull requests, Unit-Tests are automatically triggered on
[Travis-CI](https://travis-ci.org/Icinga/icingaweb2-module-director):
[![Build Status](https://travis-ci.org/Icinga/icingaweb2-module-director.svg?branch=master)](https://travis-ci.org/Icinga/icingaweb2-module-director)
We run our tests against MySQL and PostgreSQL, with PHP versions ranging from
5.3 to 7.1, including nightly builds.
### Tests for supported Platforms ### Tests for supported Platforms
As far as we know, Director is currently mostly used on CentOS (or RHEL) As far as we know, Director is currently mostly used on CentOS (or RHEL)

View File

@ -1,71 +0,0 @@
#!/bin/bash
set -ex
MODULE_HOME=${MODULE_HOME:="$(dirname "$(readlink -f "$(dirname "$0")")")"}
PHP_VERSION="$(php -r 'echo phpversion();')"
ICINGAWEB_VERSION=${ICINGAWEB_VERSION:=2.7.1}
ICINGAWEB_GITREF=${ICINGAWEB_GITREF:=}
if [ "$PHP_VERSION" '<' 7.1.0 ]; then
PHPCS_VERSION=${PHPCS_VERSION:=3.3.2}
else
PHPCS_VERSION=${PHPCS_VERSION:=3.5.2}
fi
if [ "$PHP_VERSION" '<' 5.6.0 ]; then
PHPUNIT_VERSION=${PHPUNIT_VERSION:=4.8}
else
PHPUNIT_VERSION=${PHPUNIT_VERSION:=5.7}
fi
cd "${MODULE_HOME}"
test -d vendor || mkdir vendor
cd vendor/
# icingaweb2
if [ -n "$ICINGAWEB_GITREF" ]; then
icingaweb_path="icingaweb2"
test ! -L "$icingaweb_path" || rm "$icingaweb_path"
if [ ! -d "$icingaweb_path" ]; then
git clone https://github.com/Icinga/icingaweb2.git "$icingaweb_path"
fi
(
set -e
cd "$icingaweb_path"
git fetch -p
git checkout -f "$ICINGAWEB_GITREF"
)
else
icingaweb_path="icingaweb2-${ICINGAWEB_VERSION}"
if [ ! -e "${icingaweb_path}".tar.gz ]; then
wget -O "${icingaweb_path}".tar.gz https://github.com/Icinga/icingaweb2/archive/v"${ICINGAWEB_VERSION}".tar.gz
fi
if [ ! -d "${icingaweb_path}" ]; then
tar xf "${icingaweb_path}".tar.gz
fi
rm -f icingaweb2
ln -svf "${icingaweb_path}" icingaweb2
fi
ln -svf "${icingaweb_path}"/library/Icinga Icinga
ln -svf "${icingaweb_path}"/library/vendor/Zend Zend
# phpunit
phpunit_path="phpunit-${PHPUNIT_VERSION}"
if [ ! -e "${phpunit_path}".phar ]; then
wget -O "${phpunit_path}".phar https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar
fi
ln -svf "${phpunit_path}".phar phpunit.phar
# phpcs
phpcs_path="phpcs-${PHPCS_VERSION}"
if [ ! -e "${phpcs_path}".phar ]; then
wget -O "${phpcs_path}".phar \
https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${PHPCS_VERSION}/phpcs.phar
fi
ln -svf "${phpcs_path}".phar phpcs.phar

View File

@ -1,25 +0,0 @@
#!/bin/bash
set -ex
: "${DIRECTOR_TESTDB:=director_test}"
psql_cmd() {
psql -U postgres ${DIRECTOR_TESTDB} -q -c "$@"
}
if [ "$DB" = mysql ]; then
mysql -u root -e "DROP DATABASE IF EXISTS ${DIRECTOR_TESTDB}; CREATE DATABASE ${DIRECTOR_TESTDB};"
elif [ "$DB" = pgsql ]; then
: "${DIRECTOR_TESTDB_USER:=director_test}"
psql -U postgres postgres -q -c "DROP DATABASE IF EXISTS ${DIRECTOR_TESTDB};"
psql -U postgres postgres -q -c "CREATE DATABASE ${DIRECTOR_TESTDB} WITH ENCODING 'UTF8';"
psql_cmd "CREATE USER ${DIRECTOR_TESTDB_USER} WITH PASSWORD 'testing';"
psql_cmd "GRANT ALL PRIVILEGES ON DATABASE ${DIRECTOR_TESTDB} TO ${DIRECTOR_TESTDB_USER};"
psql_cmd "CREATE EXTENSION pgcrypto;"
else
echo "Unknown database set in environment!" >&2
env
exit 1
fi