tests.yaml 1014 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: Tests
  2. on:
  3. pull_request: null
  4. push:
  5. branches:
  6. - master
  7. jobs:
  8. tests:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. matrix:
  12. php:
  13. - '7.0'
  14. - '7.1'
  15. - '7.2'
  16. - '7.3'
  17. - '7.4'
  18. - '8.0'
  19. name: PHP ${{ matrix.php }} tests
  20. steps:
  21. # checkout git
  22. - uses: actions/checkout@v2
  23. # setup PHP
  24. - uses: shivammathur/setup-php@v1
  25. with:
  26. php-version: ${{ matrix.php }}
  27. coverage: xdebug
  28. - run: composer install --no-progress --ansi
  29. if: matrix.php != '8.0'
  30. - run: composer install --no-progress --ansi --ignore-platform-reqs
  31. if: matrix.php == '8.0'
  32. - run: vendor/bin/phpunit --coverage-clover=coverage.xml
  33. if: matrix.php != '8.0'
  34. - run: vendor/bin/phpunit
  35. if: matrix.php == '8.0'
  36. - uses: codecov/codecov-action@v1
  37. if: matrix.php != '8.0'
  38. with:
  39. file: './coverage.xml'
  40. fail_ci_if_error: true