pre-release-tests.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Testing the code base against the MeiliSearch pre-releases
  2. name: Pre-Release Tests
  3. # Will only run for PRs and pushes to bump-meilisearch-v*
  4. on:
  5. push:
  6. branches: bump-meilisearch-v*
  7. pull_request:
  8. branches: bump-meilisearch-v*
  9. jobs:
  10. tests:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. php-versions: ['7.2', '7.3', '7.4', '8.0']
  15. name: integration-tests-against-rc (PHP ${{ matrix.php-versions }})
  16. steps:
  17. - uses: actions/checkout@v1
  18. - name: Install PHP
  19. uses: shivammathur/setup-php@v2
  20. with:
  21. php-version: ${{ matrix.php-versions }}
  22. - name: Validate composer.json and composer.lock
  23. run: composer validate
  24. - name: Install dependencies
  25. run: |
  26. composer remove --dev friendsofphp/php-cs-fixer --no-update --no-interaction
  27. composer install --prefer-dist --no-progress --no-suggest
  28. - name: Get the latest MeiliSearch RC
  29. run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
  30. - name: MeiliSearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
  31. run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} ./meilisearch --master-key=masterKey --no-analytics=true
  32. - name: Run test suite - default HTTP client (Guzzle 7)
  33. run: |
  34. sh scripts/tests.sh
  35. composer remove --dev guzzlehttp/guzzle http-interop/http-factory-guzzle
  36. - name: Run test suite - php-http/guzzle6-adapter
  37. # Don't run on PHP 8
  38. # Guzzle 6 is not compatible with PHP 8.0
  39. if: ${{ !startsWith(matrix.php-versions, '8.') }}
  40. run: |
  41. composer require --dev php-http/guzzle6-adapter http-interop/http-factory-guzzle
  42. sh scripts/tests.sh
  43. composer remove --dev php-http/guzzle6-adapter http-interop/http-factory-guzzle
  44. - name: Run test suite - symfony/http-client
  45. run: |
  46. composer require --dev symfony/http-client nyholm/psr7
  47. sh scripts/tests.sh
  48. composer remove --dev symfony/http-client nyholm/psr7
  49. - name: Run test suite - php-http/curl-client
  50. # Don't run on PHP 8
  51. # php-http/curl-client is currently not compatible with PHP 8.0
  52. if: ${{ !startsWith(matrix.php-versions, '8.') }}
  53. run: |
  54. composer require --dev php-http/curl-client nyholm/psr7
  55. sh scripts/tests.sh
  56. composer remove --dev php-http/curl-client nyholm/psr7
  57. - name: Run test suite - kriswallsmith/buzz
  58. # Don't run on PHP 8
  59. # kriswallsmith/buzz is currently not compatible with PHP 8.0
  60. if: ${{ !startsWith(matrix.php-versions, '8.') }}
  61. run: |
  62. composer require --dev kriswallsmith/buzz nyholm/psr7
  63. sh scripts/tests.sh
  64. composer remove --dev kriswallsmith/buzz nyholm/psr7