Skip to content

Commit

Permalink
bye bye Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Dec 7, 2021
1 parent d1d3283 commit fcc564e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 175 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ tests/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
pakefile.php export-ignore
phpunit.xml.dist export-ignore
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
HTTPSSERVER: localhost
HTTPSURI: /demo/server/server.php
PROXYSERVER: localhost:8080
# Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
# to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below.
# @todo check: is this necessary as well on GHA runners?
# was: Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
# to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below.
HTTPSVERIFYHOST: 0
HTTPSIGNOREPEER: 1
SSLVERSION: 0
Expand Down
83 changes: 0 additions & 83 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions doc/manual/phpxmlrpc_manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ lib/*:: a compatibility layer for applications which still rely on version 3 of

src/*:: the XML-RPC library classes. You can autoload these via Composer, or via a dedicated Autoloader class

tests/*:: the test suite for the library, written using PhpUnit, and the configuration to run it on Travis
tests/*:: the test suite for the library, written using PhpUnit, and the configuration to run it either on GitHub Actions or in a local Docker container


[[bugs]]
Expand Down Expand Up @@ -1953,7 +1953,7 @@ Backward compatibility is maintained via _lib/xmlrpc.inc_, _lib/xmlrpcs.inc_ and

* improved: a specific option allows users to decide the version of SSL to use for https calls.
This is useful f.e. for the testing suite, when the server target of calls has no proper ssl certificate,
and the cURL extension has been compiled with GnuTLS (such as on Travis VMs)
and the cURL extension has been compiled with GnuTLS

* improved: the function `wrap_php_function()` now can be used to wrap closures (it is now a method btw)

Expand Down
3 changes: 1 addition & 2 deletions tests/ci/setup/setup_apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ SCRIPT_DIR="$(dirname -- "$(readlink -f "$0")")"
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2

# set up Apache for php-fpm
# @see https://github.com/travis-ci/travis-ci.github.com/blob/master/docs/user/languages/php.md#apache--php

a2enmod rewrite proxy_fcgi setenvif ssl

Expand All @@ -28,7 +27,7 @@ if [ -f /etc/apache2/sites-available/default-ssl.conf ]; then
rm /etc/apache2/sites-available/default-ssl.conf
fi

if [ -n "${TRAVIS}" -o -n "${GITHUB_ACTIONS}" ]; then
if [ -n "${GITHUB_ACTIONS}" ]; then
echo "export TESTS_ROOT_DIR=$(pwd)" >> /etc/apache2/envvars
else
echo "export TESTS_ROOT_DIR=/var/www/html" >> /etc/apache2/envvars
Expand Down
39 changes: 10 additions & 29 deletions tests/ci/setup/setup_code_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,25 @@
# @todo add 'query' action
# @todo avoid reloading php-fpm if config did not change

# Note: we have php set up either via phpenv (TRAVIS=true), Ubuntu packages (PHP_VERSION=default) or Sury packages.
# Note: we have php set up either via Ubuntu packages (PHP_VERSION=default) or Sury packages.
# xdebug comes either at version 2 or 3

set -e

if [ "$TRAVIS" != true ]; then
PHPCONFDIR_CLI=$(php -i | grep 'Scan this dir for additional .ini files' | sed 's|Scan this dir for additional .ini files => ||')
PHPCONFDIR_FPM=$(echo "$PHPCONFDIR_CLI" | sed 's|/cli/|/fpm/|')
fi

enable_cc() {
if [ "$TRAVIS" = true ]; then
phpenv config-add tests/ci/config/codecoverage_xdebug.ini

pkill php-fpm
~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
else
if [ -L "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini"; fi
sudo ln -s $(realpath tests/ci/config/codecoverage_xdebug.ini) "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini"
if [ -L "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini"; fi
sudo ln -s $(realpath tests/ci/config/codecoverage_xdebug.ini) "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini"

sudo service php-fpm restart
fi
if [ -L "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini"; fi
sudo ln -s $(realpath tests/ci/config/codecoverage_xdebug.ini) "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini"
if [ -L "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini"; fi
sudo ln -s $(realpath tests/ci/config/codecoverage_xdebug.ini) "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini"

sudo service php-fpm restart
}

disable_cc() {
if [ "$TRAVIS" = true ]; then
phpenv config-rm tests/ci/config/codecoverage_xdebug.ini

pkill php-fpm
~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
else
if [ -L "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini"; fi
if [ -L "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini"; fi
if [ -L "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_CLI}/99-codecoverage_xdebug.ini"; fi
if [ -L "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini" ]; then sudo rm "${PHPCONFDIR_FPM}/99-codecoverage_xdebug.ini"; fi

sudo service php-fpm restart
fi
sudo service php-fpm restart
}

case "$1" in
Expand Down
2 changes: 0 additions & 2 deletions tests/ci/setup/setup_php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

# Has to be run as admin

# To be kept in sync with setup_php_travis.sh

# @todo make it optional to install xdebug. It is fe. missing in sury's ppa for Xenial
# @todo make it optional to disable xdebug ?

Expand Down
53 changes: 0 additions & 53 deletions tests/ci/setup/setup_php_travis.sh

This file was deleted.

1 change: 0 additions & 1 deletion tests/ci/vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ACTION="${1}"
# Valid values: 'default', 5.6, 7.0 .. 7.4, 8.0 .. 8.1
export PHP_VERSION=${PHP_VERSION:-default}
# Valid values: precise (12), trusty (14), xenial (16), bionic (18), focal (20)
# We default to the same version we use on Travis
export UBUNTU_VERSION=${UBUNTU_VERSION:-bionic}

CONTAINER_USER=docker
Expand Down

0 comments on commit fcc564e

Please sign in to comment.