From 9ed397f46d4a6bb92b8a2f857a18fff3198a4a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Tue, 12 Apr 2022 09:09:48 +0200 Subject: [PATCH] [CI] Moved Solr job to Github Actions For more details see https://github.com/ezsystems/ezplatform-richtext/pull/224 --- .github/workflows/ci.yaml | 39 ++++++++++++++++++++++ .travis.yml | 70 --------------------------------------- composer.json | 3 +- 3 files changed, 41 insertions(+), 71 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ee6b1969..327bf334 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -171,3 +171,42 @@ jobs: run: composer run-script integration env: DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + solr-integration: + name: "Solr integration tests" + runs-on: "ubuntu-20.04" + timeout-minutes: 30 + permissions: + packages: read + contents: read + services: + solr: + image: ghcr.io/ibexa/core/solr + ports: + - 8983:8983 + options: >- + --health-cmd "solr status" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + coverage: none + + - name: Add solr dependency + run: composer require --no-update "ezsystems/ezplatform-solr-search-engine:^3.3@dev" + + - uses: "ramsey/composer-install@v1" + with: + dependency-versions: "highest" + + - name: Run integration test suite + run: composer integration-solr + env: + CORES_SETUP: single diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1e9b41a3..00000000 --- a/.travis.yml +++ /dev/null @@ -1,70 +0,0 @@ -dist: trusty -language: php - -services: - - mysql - -# Mysql isn't installed on trusty (only client is), so we need to specifically install it -addons: - apt: - packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 - -cache: - directories: - - $HOME/.composer/cache/files - -branches: - only: - - master - - /^\d.\d+$/ - -matrix: - fast_finish: true - include: -# 7.3 - - name: '[PHP 7.3] Solr Search Engine Integration' - php: 7.3 - env: - - SOLR_VERSION="7.7.3" - - TEST_CONFIG="phpunit-integration-legacy-solr.xml" - - CORES_SETUP="shared" - - SOLR_CONFIG="vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/schema.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/custom-fields-types.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/language-fieldtypes.xml" - -# reduce depth (history) of git checkout -git: - depth: 30 - -# disable mail notifications -notifications: - email: false - slack: - rooms: - - secure: "KjjHNUh2GU9OkIhvppS1S6SALGwDa4p8rdYO6mxg4hcKB2CnygPV15fAKTRexgy1q1xZI2ts+fPQynqImp34KvtgRFfkea89UebbLEEOrwvaDQJ+3xv+oXPsFOl3jB0dftSAEO7I0K2OOp40rBRmk5Q3Srr34MZcRZEo5D2Kdu0AvYiAE/nhA07tJkTApTmuWfMa8yUxLCMocOACBe2OvNqEvbv/D0tt4tLPHDqnFvAvCZQFaaoKhOzZFc83NiM281N8xtP3E8rmImY1nKORl13owDQ5i5Fz/5Pn20ttBtUDYTJwUQ9wsaT8RStgL8w+YFYtKVMaBBtP2BIWoz7R278pr8q49HeTx72FIlWDsTknKXjfqzpqwfrPhoJUwB1XmQcXoi1z0z8bvGL3GPgpnYrENxmuUX/CYnL0dq9jkI9twxNr/P+5JClb/J+JZEKta8f1bZUdq7zPRPL5+hrDlg6elvwLkSAXA5zh0/tVd1WKWgmL7eEjqTi1ew3RIVcflsJNHNGZBXD9jpbuXLDa7QaTlwqHBHdERAExNnlDse9U0p6yJLFS2oCqBTVHvleX3xkclPSvaJSlUFtn7zNR+JpUPNbN17ADaYf3Wzo2xifrMjbv7POEotL3ddlkuCAbwAJo4hMJwcQD1vahk28AOivyoAMIXlcOZ2oKCxqWE8Y=" - on_success: change - on_failure: always - on_pull_requests: false - -# setup requirements for running unit/integration/behat tests -before_install: - # Disable xdebug to speed things up as we don't currently generate coverage on travis - - phpenv config-rm xdebug.ini - # Add custom php.ini configuration for test matrix - - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - echo "default_charset=UTF-8" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - # Detecting timezone issues by testing on random timezone - - TEST_TIMEZONES=("America/New_York" "Asia/Calcutta" "UTC") - - TEST_TIMEZONE=${TEST_TIMEZONES["`shuf -i 0-2 -n 1`"]} - -install: - # Prepare system - - ./bin/.travis/prepare_unittest.sh - - travis_retry composer install --no-progress --no-interaction --prefer-dist --no-suggest - # Setup Solr / Elastic search if asked for - - ./vendor/ezsystems/ezplatform-solr-search-engine/bin/.travis/init_solr.sh - -# execute phpunit or behat as the script command -script: - - php -d date.timezone=$TEST_TIMEZONE ./vendor/bin/phpunit -c $TEST_CONFIG diff --git a/composer.json b/composer.json index 1c7b2c3c..2bec0815 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,8 @@ "integration": [ "Composer\\Config::disableProcessTimeout", "phpunit -c phpunit-integration-legacy.xml" - ] + ], + "integration-solr": "phpunit -c phpunit-integration-legacy-solr.xml" }, "extra": { "branch-alias": {