sumplelinter.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: linter
  2. on:
  3. pull_request:
  4. push:
  5. branches: [ main ]
  6. permissions:
  7. contents: read
  8. jobs:
  9. linter:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. php-versions: [ '7.2' ]
  14. steps:
  15. - uses: actions/checkout@v3
  16. name: Checkout
  17. - uses: eWaterCycle/setup-grpc@v5
  18. name: Setup gRPC
  19. with:
  20. grpc-version: 1.51.1
  21. - uses: shivammathur/setup-php@v2
  22. name: Setup PHP
  23. id: php
  24. with:
  25. extensions: grpc
  26. php-version: ${{ matrix.php-versions }}
  27. - run: composer validate --strict
  28. name: Validate composer.json and composer.lock
  29. - uses: actions/cache@v3
  30. name: Cache Composer packages
  31. id: composer-cache
  32. with:
  33. path: vendor
  34. key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  35. restore-keys: |
  36. ${{ runner.os }}-php-
  37. - name: Install dependencies
  38. run: composer install --prefer-dist --no-progress
  39. - name: Run tests
  40. run: ./vendor/bin/phplint \
  41. ./ --exclude=vendor