From 8d0c8515da72dae9696f95acec9ddda0d031ab21 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 30 Aug 2023 17:31:38 +0200 Subject: [PATCH] Drop travis integration --- .travis.yml | 42 ------------------------- doc/93-Testing.md | 11 ------- test/setup_vendor.sh | 71 ------------------------------------------ test/travis-prepare.sh | 25 --------------- 4 files changed, 149 deletions(-) delete mode 100644 .travis.yml delete mode 100755 test/setup_vendor.sh delete mode 100755 test/travis-prepare.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bd73458e..00000000 --- a/.travis.yml +++ /dev/null @@ -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' diff --git a/doc/93-Testing.md b/doc/93-Testing.md index 7d2f8fb9..85e58047 100644 --- a/doc/93-Testing.md +++ b/doc/93-Testing.md @@ -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 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 As far as we know, Director is currently mostly used on CentOS (or RHEL) diff --git a/test/setup_vendor.sh b/test/setup_vendor.sh deleted file mode 100755 index c53982f8..00000000 --- a/test/setup_vendor.sh +++ /dev/null @@ -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 diff --git a/test/travis-prepare.sh b/test/travis-prepare.sh deleted file mode 100755 index 7a303e88..00000000 --- a/test/travis-prepare.sh +++ /dev/null @@ -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