DE-159650: Fix test hangs in single-node CI cluster #266
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Continuous integration' | |
| on: ['push', 'pull_request'] | |
| jobs: | |
| phpstan: | |
| runs-on: 'ubuntu-latest' | |
| name: 'PHPStan (PHP ${{ matrix.php }})' | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| php: | |
| - '8.2' | |
| fail-fast: false | |
| steps: | |
| - name: 'Checkout' | |
| uses: 'actions/checkout@v4' | |
| - name: 'Setup PHP' | |
| uses: 'shivammathur/setup-php@v2' | |
| with: | |
| php-version: '${{ matrix.php }}' | |
| coverage: 'none' | |
| tools: 'composer:v2' | |
| extensions: 'curl, json, mbstring, openssl' | |
| - name: 'Get composer cache directory' | |
| id: 'composer_cache' | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: 'Cache dependencies' | |
| uses: 'actions/cache@v4' | |
| with: | |
| path: '${{ steps.composer_cache.outputs.dir }}' | |
| key: '${{ runner.os }}-composer-php${{ matrix.php }}-${{ hashFiles(''**/composer.json'') }}' | |
| restore-keys: | | |
| ${{ runner.os }}-composer-php${{ matrix.php }}- | |
| ${{ runner.os }}-composer- | |
| - name: 'Install dependencies' | |
| run: composer install --prefer-dist --no-interaction --no-progress --ansi | |
| - name: 'Run PHPStan' | |
| run: vendor/bin/phpstan analyse --no-progress --error-format=github | |
| phpunit: | |
| runs-on: 'ubuntu-latest' | |
| name: 'PHPUnit (PHP ${{ matrix.php }}, ES ${{ matrix.elasticsearch }})' | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| php: | |
| - '8.2' | |
| - '8.3' | |
| elasticsearch: | |
| - '9.3.0' | |
| fail-fast: false | |
| services: | |
| elasticsearch: | |
| image: 'docker.elastic.co/elasticsearch/elasticsearch:${{ matrix.elasticsearch }}' | |
| env: | |
| discovery.type: 'single-node' | |
| xpack.security.enabled: 'false' | |
| xpack.security.transport.ssl.enabled: 'false' | |
| ES_JAVA_OPTS: '-Xms512m -Xmx512m' | |
| action.destructive_requires_name: 'false' | |
| path.repo: '/usr/share/elasticsearch/repository' | |
| ports: | |
| - '9200:9200' | |
| options: >- | |
| --health-cmd "curl -sf http://localhost:9200/_cluster/health || exit 1" | |
| --health-interval 10s | |
| --health-timeout 10s | |
| --health-retries 20 | |
| steps: | |
| - name: 'Checkout' | |
| uses: 'actions/checkout@v4' | |
| - name: 'Setup PHP' | |
| uses: 'shivammathur/setup-php@v2' | |
| with: | |
| php-version: '${{ matrix.php }}' | |
| coverage: 'none' | |
| tools: 'composer:v2' | |
| extensions: 'curl, json, mbstring, openssl' | |
| - name: 'Get composer cache directory' | |
| id: 'composer_cache' | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: 'Cache dependencies' | |
| uses: 'actions/cache@v4' | |
| with: | |
| path: '${{ steps.composer_cache.outputs.dir }}' | |
| key: '${{ runner.os }}-composer-php${{ matrix.php }}-${{ hashFiles(''**/composer.json'') }}' | |
| restore-keys: | | |
| ${{ runner.os }}-composer-php${{ matrix.php }}- | |
| ${{ runner.os }}-composer- | |
| - name: 'Install dependencies' | |
| run: composer install --prefer-dist --no-interaction --no-progress --ansi | |
| - name: 'Run PHPUnit' | |
| run: vendor/bin/phpunit --configuration phpunit.xml.dist | |
| env: | |
| ES_HOST: 'localhost' | |
| ES_PORT: '9200' |