ci.yml 806 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. phpcs:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Setup PHP environment
  13. uses: shivammathur/setup-php@v2
  14. - name: Install dependencies
  15. run: composer install
  16. - name: PHPCSFixer check
  17. run: composer check-style
  18. phpunit:
  19. strategy:
  20. matrix:
  21. php_version: [7.3, 7.4, 8.0]
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Setup PHP environment
  26. uses: shivammathur/setup-php@v2
  27. with:
  28. php-version: ${{ matrix.php_version }}
  29. coverage: xdebug
  30. - name: Install dependencies
  31. run: composer install
  32. - name: PHPUnit check
  33. run: ./vendor/bin/phpunit --coverage-text