ci.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. name: CI
  2. on: [push]
  3. jobs:
  4. old:
  5. name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
  6. runs-on: ${{ matrix.operating-system }}
  7. strategy:
  8. matrix:
  9. operating-system: ['ubuntu-16.04']
  10. php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0']
  11. phpunit-versions: ['7.5.20']
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v2
  15. - name: Setup PHP
  16. uses: shivammathur/setup-php@v2
  17. with:
  18. php-version: ${{ matrix.php-versions }}
  19. extensions: mbstring, intl
  20. ini-values: post_max_size=256M, max_execution_time=180
  21. tools: psalm, phpunit:${{ matrix.phpunit-versions }}
  22. - name: Install dependencies
  23. run: composer self-update --1; composer install
  24. - name: PHPUnit tests
  25. uses: php-actions/phpunit@v2
  26. with:
  27. memory_limit: 256M
  28. moderate:
  29. name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
  30. runs-on: ${{ matrix.operating-system }}
  31. strategy:
  32. matrix:
  33. operating-system: ['ubuntu-latest']
  34. php-versions: ['7.1', '7.2', '7.3']
  35. phpunit-versions: ['latest']
  36. steps:
  37. - name: Checkout
  38. uses: actions/checkout@v2
  39. - name: Setup PHP
  40. uses: shivammathur/setup-php@v2
  41. with:
  42. php-version: ${{ matrix.php-versions }}
  43. extensions: mbstring, intl, sodium
  44. ini-values: post_max_size=256M, max_execution_time=180
  45. tools: psalm, phpunit:${{ matrix.phpunit-versions }}
  46. - name: Install dependencies
  47. run: composer install
  48. - name: Modernize dependencies
  49. run: composer require --dev "phpunit/phpunit:>=4"
  50. - name: PHPUnit tests
  51. uses: php-actions/phpunit@v2
  52. timeout-minutes: 30
  53. with:
  54. memory_limit: 256M
  55. modern:
  56. name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
  57. runs-on: ${{ matrix.operating-system }}
  58. strategy:
  59. matrix:
  60. operating-system: ['ubuntu-latest']
  61. php-versions: ['7.4', '8.0']
  62. phpunit-versions: ['latest']
  63. steps:
  64. - name: Checkout
  65. uses: actions/checkout@v2
  66. - name: Setup PHP
  67. uses: shivammathur/setup-php@v2
  68. with:
  69. php-version: ${{ matrix.php-versions }}
  70. extensions: mbstring, intl, sodium
  71. ini-values: post_max_size=256M, max_execution_time=180
  72. tools: psalm, phpunit:${{ matrix.phpunit-versions }}
  73. - name: Install dependencies
  74. run: composer install
  75. - name: Modernize dependencies
  76. run: composer require --dev "phpunit/phpunit:>=4"
  77. - name: PHPUnit tests
  78. uses: php-actions/phpunit@v2
  79. timeout-minutes: 30
  80. with:
  81. memory_limit: 256M
  82. - name: Install Psalm
  83. run: rm composer.lock && composer require --dev vimeo/psalm:^4
  84. - name: Static Analysis
  85. run: vendor/bin/psalm