ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: "CI"
  2. on:
  3. push:
  4. branches:
  5. - "master"
  6. pull_request: null
  7. jobs:
  8. qa:
  9. name: "QA"
  10. runs-on: "ubuntu-latest"
  11. steps:
  12. - name: "Checkout"
  13. uses: "actions/checkout@v3.5.2"
  14. - name: "Set up PHP"
  15. uses: "shivammathur/setup-php@2.25.1"
  16. with:
  17. coverage: "none"
  18. php-version: "8.0"
  19. tools: "phive"
  20. - name: "Install dependencies with composer"
  21. run: "composer install --no-interaction --optimize-autoloader --prefer-dist"
  22. - name: "Install dependencies with phive"
  23. env:
  24. GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  25. run: "ant install-tools"
  26. - name: "Run php-cs-fixer"
  27. run: "ant php-cs-fixer"
  28. - name: "Run psalm"
  29. run: "ant psalm"
  30. tests:
  31. name: "Tests"
  32. runs-on: "ubuntu-latest"
  33. strategy:
  34. fail-fast: false
  35. matrix:
  36. php-versions:
  37. - "7.2"
  38. - "7.3"
  39. - "7.4"
  40. - "8.0"
  41. - "8.1"
  42. - "8.2"
  43. steps:
  44. - name: "Checkout"
  45. uses: "actions/checkout@v3.5.2"
  46. - name: "Set up PHP"
  47. uses: "shivammathur/setup-php@2.25.1"
  48. env:
  49. COMPOSER_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
  50. with:
  51. coverage: "pcov"
  52. extensions: "${{ env.extensions }}"
  53. ini-values: "display_errors=On, error_reporting=-1, memory_limit=2G"
  54. php-version: "${{ matrix.php-versions }}"
  55. tools: "phive"
  56. - name: "Install dependencies with composer"
  57. run: "composer install --no-interaction --optimize-autoloader --prefer-dist"
  58. - name: "Install dependencies with phive"
  59. env:
  60. GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  61. run: "ant install-tools"
  62. - name: "Run PHPUnit"
  63. run: "tools/phpunit --coverage-clover build/logs/clover.xml"
  64. - name: "Send code coverage report to codecov.io"
  65. uses: "codecov/codecov-action@v3.1.4"
  66. with:
  67. files: "build/logs/clover.xml"