From 2d7dcfa421ba6505d0aaea2e1f5436ddac96a588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Tue, 26 Jan 2021 14:55:47 +0200 Subject: [PATCH 1/2] Refactor Travis-CI --- .travis.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0477ece..351cf56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,21 @@ -# This uses newer and faster docker based build system -sudo: false - language: php +os: linux services: mysql -notifications: - on_success: never - on_failure: change - php: - - nightly - 7.2 - 7.3 + - nightly env: - WP_TEST_URL=http://localhost:12000 WP_TEST_USER=test WP_TEST_USER_PASS=test DB_USER=root DB_PASSWORD='' DB_NAME=test -matrix: +jobs: allow_failures: - php: nightly -before_install: - - rvm install 2.2.5 - -before_script: +install: # Downgrade Composer to latest 1.x series - composer self-update 1.10.16 # Install composer packages before trying to activate themes or plugins @@ -54,6 +45,7 @@ before_script: script: # Remove one file to avoid false positive __autoload() detection by php -l later on - rm htdocs/wordpress/wp-includes/spl-autoload-compat.php + # Syntax check all php files and fail for any error text in STDERR - '! find . -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"' # @TODO: Run a more extensive test using the above real WordPress installation From c6b4cff74292b33314f665ab3666186e6e93a009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Tue, 26 Jan 2021 14:55:47 +0200 Subject: [PATCH 2/2] Check commit messages with Gnitpick and minor Travis-CI syntax fixes --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 351cf56..29d0ac9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,14 @@ env: - WP_TEST_URL=http://localhost:12000 WP_TEST_USER=test WP_TEST_USER_PASS=test DB_USER=root DB_PASSWORD='' DB_NAME=test jobs: + include: + - name: Gnitpick + language: python + services: # none + install: + - curl -O https://raw.githubusercontent.com/Seravo/gnitpick/master/gnitpick.py + script: + - python3 ./gnitpick.py allow_failures: - php: nightly