tests.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: "Tests"
  2. on:
  3. push:
  4. paths-ignore:
  5. - '**.md'
  6. pull_request:
  7. paths-ignore:
  8. - '**.md'
  9. jobs:
  10. tests:
  11. name: PHP ${{ matrix.php }}
  12. runs-on: ubuntu-latest
  13. strategy:
  14. matrix:
  15. php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
  16. steps:
  17. - name: Checkout Code
  18. uses: actions/checkout@v2
  19. - name: Setup PHP
  20. uses: shivammathur/setup-php@v2
  21. with:
  22. php-version: ${{ matrix.php }}
  23. tools: composer:v2
  24. coverage: none
  25. - name: Setup Problem Matchers
  26. run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
  27. - name: Install PHP 5/7 Dependencies
  28. uses: nick-invision/retry@v1
  29. with:
  30. timeout_minutes: 5
  31. max_attempts: 5
  32. command: composer update --no-interaction --no-progress
  33. if: "matrix.php != '8.0'"
  34. - name: Install PHP 8 Dependencies
  35. uses: nick-invision/retry@v1
  36. with:
  37. timeout_minutes: 5
  38. max_attempts: 5
  39. command: |
  40. composer require "phpunit/phpunit:^9.3" --no-update
  41. composer update --no-interaction --no-progress --ignore-platform-req=php
  42. php -v
  43. if: "matrix.php == '8.0'"
  44. - name: Execute PHPUnit
  45. run: vendor/bin/phpunit