run-phar-tests.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: Run Phar tests
  2. on:
  3. workflow_call:
  4. jobs:
  5. test:
  6. name: PHP ${{ matrix.php }} (${{ matrix.build_version }})
  7. runs-on: ubuntu-latest
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. build_version: [psysh, psysh-php70]
  12. php: ['7.2', '7.3', '7.4', '8.0']
  13. include:
  14. - build_version: psysh
  15. php: '8.1'
  16. - build_version: psysh
  17. php: '8.2'
  18. - build_version: psysh
  19. php: '8.3'
  20. - build_version: psysh
  21. php: '8.4'
  22. - build_version: psysh-php70
  23. php: '7.0'
  24. - build_version: psysh-php70
  25. php: '7.1'
  26. steps:
  27. - name: Check out code
  28. uses: actions/checkout@v3.5.3
  29. with:
  30. sparse-checkout-cone-mode: false
  31. sparse-checkout: |
  32. .github
  33. test
  34. - name: Install PHP
  35. uses: shivammathur/setup-php@2.25.4
  36. with:
  37. php-version: ${{ matrix.php }}
  38. tools: composer:v2
  39. coverage: none
  40. - name: Download build artifacts
  41. uses: actions/download-artifact@v3.0.2
  42. with:
  43. name: binaries
  44. path: build
  45. - name: Make binaries executable
  46. run: chmod +x build/*/psysh
  47. - name: Smoke test
  48. run: .github/bin/smoketest.sh ${{ matrix.build_version }}
  49. - name: Set up problem matchers
  50. run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
  51. - name: Composer init
  52. run: composer init --no-interaction --name=psy/test --autoload=test/
  53. - name: Install PHPUnit
  54. uses: nick-fields/retry@v2.8.3
  55. with:
  56. timeout_minutes: 5
  57. max_attempts: 5
  58. command: composer require --no-interaction --no-progress "phpunit/phpunit:^6.5.14|^7.5.15|^8.5|^9.4"
  59. - name: Run test suite
  60. run: vendor/bin/phpunit --bootstrap build/${{ matrix.build_version }}/psysh --exclude-group isolation-fail test/