From ffc40cc5176e9b652af0a808490e9a3d4a723b05 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 3 Jun 2018 15:54:48 +0200 Subject: [PATCH] Replace apigen with Sami in CI - Removed apigen/apigen - Added sami/sami - Generated a configuration and added it in /test/ as config-sami.php - Removed "apidocs" from matrix in .travis.yml Closes: #14345 Signed-off-by: William Desportes --- .travis.yml | 10 ++-------- test/ci-apidocs | 2 +- test/ci-install-apidocs | 2 +- test/sami-config.php | 22 ++++++++++++++++++++++ 4 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 test/sami-config.php diff --git a/.travis.yml b/.travis.yml index 928da4e04c..7945ea4e3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ sudo: required env: matrix: - CI_MODE=test - - CI_MODE=apidocs global: - TESTSUITE_USER=root - TESTSUITE_URL=http://127.0.0.1:8000 @@ -65,6 +64,8 @@ matrix: env: CI_MODE=release - php: "7.1" env: CI_MODE=docs + - php: "7.1" + env: CI_MODE=apidocs - os: osx language: generic env: CI_MODE=test @@ -76,14 +77,7 @@ matrix: - curl https://getcomposer.org/installer | php - ln -s "`pwd`/composer.phar" /usr/local/bin/composer - mysql.server start - exclude: - - php: "7.2" - env: CI_MODE=apidocs - - php: "nightly" - env: CI_MODE=apidocs allow_failures: - - php: "7.1" - env: CI_MODE=apidocs - php: "nightly" env: CI_MODE=test diff --git a/test/ci-apidocs b/test/ci-apidocs index 8c94f17ffd..5b550361f2 100755 --- a/test/ci-apidocs +++ b/test/ci-apidocs @@ -1,3 +1,3 @@ #!/bin/sh set -e -./vendor/bin/apigen generate --destination apidoc --source libraries/ +./vendor/bin/sami.php --no-interaction update ./test/sami-config.php diff --git a/test/ci-install-apidocs b/test/ci-install-apidocs index 449e54b75c..797211874a 100755 --- a/test/ci-install-apidocs +++ b/test/ci-install-apidocs @@ -1,3 +1,3 @@ #!/bin/sh set -e -composer require "apigen/apigen:^4.1" +composer require "sami/sami:^4.0" diff --git a/test/sami-config.php b/test/sami-config.php new file mode 100644 index 0000000000..47c9a992a9 --- /dev/null +++ b/test/sami-config.php @@ -0,0 +1,22 @@ + +files() + ->name("*.php") + ->in("./libraries") +; + +return new Sami($iterator, array( + "title" => "MySQL web administration tool", + "build_dir" => "./build/apidocs/", + "cache_dir" => "./tmp" +)); +