ci.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: "Continuous Integration"
  2. on:
  3. pull_request:
  4. jobs:
  5. coding-standards:
  6. name: "Coding Standards"
  7. runs-on: "ubuntu-latest"
  8. strategy:
  9. matrix:
  10. php-version:
  11. - "7.4"
  12. steps:
  13. - name: "Checkout"
  14. uses: "actions/checkout@v2"
  15. - name: "Install PHP"
  16. uses: "shivammathur/setup-php@v2"
  17. with:
  18. coverage: "none"
  19. php-version: "${{ matrix.php-version }}"
  20. tools: "cs2pr"
  21. - name: "Cache dependencies installed with composer"
  22. uses: "actions/cache@v1"
  23. with:
  24. path: "~/.composer/cache"
  25. key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
  26. restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
  27. - name: "Install dependencies with composer"
  28. run: "composer install --no-interaction --no-progress --no-suggest"
  29. - name: "Run squizlabs/php_codesniffer"
  30. run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
  31. phpunit:
  32. name: PHPUnit
  33. runs-on: ubuntu-latest
  34. strategy:
  35. matrix:
  36. php-version: ['7.1', '7.2', '7.3', '7.4']
  37. steps:
  38. - name: "Checkout"
  39. uses: "actions/checkout@v2"
  40. - name: Setup PHP
  41. uses: shivammathur/setup-php@v1
  42. with:
  43. php-version: ${{ matrix.php-version }}
  44. - name: "Install dependencies with composer"
  45. run: "composer install --no-interaction --no-progress --no-suggest"
  46. - name: PHPUnit
  47. run: "vendor/bin/phpunit"