|
| 1 | +name: PHP integration tests |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + name: Test |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + php-version: [8.1, 8.2, 8.3, 8.4] |
| 13 | + os: [ubuntu-latest] |
| 14 | + es-version: [9.0.0-SNAPSHOT] |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Use PHP ${{ matrix.php-version }} |
| 21 | + uses: shivammathur/setup-php@v2 |
| 22 | + with: |
| 23 | + php-version: ${{ matrix.php-version }} |
| 24 | + extensions: yaml, zip, curl |
| 25 | + coverage: none |
| 26 | + env: |
| 27 | + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + |
| 29 | + - name: Get composer cache directory |
| 30 | + id: composercache |
| 31 | + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT |
| 32 | + - name: Cache dependencies |
| 33 | + uses: actions/cache@v4 |
| 34 | + with: |
| 35 | + path: ${{ steps.composercache.outputs.dir }} |
| 36 | + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} |
| 37 | + restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}- |
| 38 | + |
| 39 | + - name: Install dependencies |
| 40 | + run: | |
| 41 | + composer install --prefer-dist |
| 42 | +
|
| 43 | + - name: Run Elasticsearch using start-local |
| 44 | + run: | |
| 45 | + curl -fsSL https://elastic.co/start-local | sh -s -- -v ${{ matrix.es-version }} -esonly |
| 46 | +
|
| 47 | + - name: YAML tests |
| 48 | + run: | |
| 49 | + source elastic-start-local/.env |
| 50 | + ELASTICSEARCH_URL="http://elastic:${ES_LOCAL_PASSWORD}@localhost:9200" TEST_SUITE="platinum" composer run-script integration-test |
0 commit comments