ci.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: CI
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. PHPUnit:
  7. name: PHPUnit (PHP ${{ matrix.php }} on ${{ matrix.os }})
  8. runs-on: ${{ matrix.os }}
  9. strategy:
  10. matrix:
  11. os:
  12. - ubuntu-22.04
  13. - windows-2022
  14. php:
  15. - 8.3
  16. - 8.2
  17. - 8.1
  18. - 8.0
  19. - 7.4
  20. - 7.3
  21. - 7.2
  22. - 7.1
  23. - 7.0
  24. - 5.6
  25. - 5.5
  26. - 5.4
  27. - 5.3
  28. steps:
  29. - uses: actions/checkout@v4
  30. - uses: shivammathur/setup-php@v2
  31. with:
  32. php-version: ${{ matrix.php }}
  33. coverage: xdebug
  34. ini-file: development
  35. - run: composer config secure-http false && composer config repo.packagist composer http://packagist.org && composer config preferred-install source
  36. if: ${{ matrix.php < 5.5 && matrix.os == 'windows-2022' }} # legacy PHP on Windows is allowed to use insecure downloads until it will be removed again
  37. - run: composer install
  38. - run: vendor/bin/phpunit --coverage-text
  39. if: ${{ matrix.php >= 7.3 }}
  40. - run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
  41. if: ${{ matrix.php < 7.3 }}
  42. PHPUnit-macOS:
  43. name: PHPUnit (macOS)
  44. runs-on: macos-12
  45. continue-on-error: true
  46. steps:
  47. - uses: actions/checkout@v4
  48. - uses: shivammathur/setup-php@v2
  49. with:
  50. php-version: 8.2
  51. coverage: xdebug
  52. - run: composer install
  53. - run: vendor/bin/phpunit --coverage-text
  54. PHPUnit-hhvm:
  55. name: PHPUnit (HHVM)
  56. runs-on: ubuntu-22.04
  57. continue-on-error: true
  58. steps:
  59. - uses: actions/checkout@v4
  60. - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
  61. - name: Run hhvm composer.phar install
  62. uses: docker://hhvm/hhvm:3.30-lts-latest
  63. with:
  64. args: hhvm composer.phar install
  65. - name: Run hhvm vendor/bin/phpunit
  66. uses: docker://hhvm/hhvm:3.30-lts-latest
  67. with:
  68. args: hhvm vendor/bin/phpunit