phpunit.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: "PHPUnit tests"
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - "master"
  7. jobs:
  8. phpunit:
  9. name: "PHPUnit tests"
  10. runs-on: ${{ matrix.operating-system }}
  11. strategy:
  12. matrix:
  13. dependencies:
  14. - "lowest"
  15. - "highest"
  16. php-version:
  17. - "7.2"
  18. - "7.3"
  19. - "7.4"
  20. - "8.0"
  21. operating-system:
  22. - "ubuntu-latest"
  23. steps:
  24. - name: "Checkout"
  25. uses: "actions/checkout@v2"
  26. - name: "Install PHP"
  27. uses: "shivammathur/setup-php@v2"
  28. with:
  29. coverage: "pcov"
  30. php-version: "${{ matrix.php-version }}"
  31. ini-values: memory_limit=-1
  32. tools: composer:v2
  33. - name: "Install lowest dependencies"
  34. if: ${{ matrix.dependencies == 'lowest' }}
  35. run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
  36. - name: "Install highest dependencies"
  37. if: ${{ matrix.dependencies == 'highest' }}
  38. run: "composer update --no-interaction --no-progress --no-suggest"
  39. - name: "Tests"
  40. run: "vendor/bin/phpunit"