continuous-integration.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: "Continuous Integration"
  2. on:
  3. pull_request:
  4. branches:
  5. - "*.x"
  6. - "master"
  7. push:
  8. branches:
  9. - "*.x"
  10. - "master"
  11. jobs:
  12. phpunit:
  13. name: "PHPUnit"
  14. runs-on: "ubuntu-20.04"
  15. strategy:
  16. matrix:
  17. php-version:
  18. - "7.1"
  19. - "7.2"
  20. - "7.3"
  21. - "7.4"
  22. - "8.0"
  23. deps:
  24. - "normal"
  25. include:
  26. - deps: "low"
  27. php-version: "7.2"
  28. steps:
  29. - name: "Checkout"
  30. uses: "actions/checkout@v2"
  31. with:
  32. fetch-depth: 2
  33. - name: "Install PHP"
  34. uses: "shivammathur/setup-php@v2"
  35. with:
  36. php-version: "${{ matrix.php-version }}"
  37. coverage: "pcov"
  38. ini-values: "zend.assertions=1"
  39. - name: "Cache dependencies installed with composer"
  40. uses: "actions/cache@v2"
  41. with:
  42. path: "~/.composer/cache"
  43. key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
  44. restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
  45. - name: "Update dependencies with composer"
  46. run: "composer update --no-interaction --no-progress --no-suggest"
  47. if: "${{ matrix.deps == 'normal' }}"
  48. - name: "Install lowest possible dependencies with composer"
  49. run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-lowest"
  50. if: "${{ matrix.deps == 'low' }}"
  51. - name: "Run PHPUnit"
  52. run: "vendor/bin/phpunit"