1
0

lint-php-cs.yml 827 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # This workflow is provided via the organization template repository
  2. #
  3. # https://github.com/nextcloud/.github
  4. # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
  5. name: Lint
  6. on: pull_request
  7. permissions:
  8. contents: read
  9. concurrency:
  10. group: lint-php-cs-${{ github.head_ref || github.run_id }}
  11. cancel-in-progress: true
  12. jobs:
  13. lint:
  14. runs-on: ubuntu-latest
  15. name: php-cs
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v3
  19. - name: Set up php
  20. uses: shivammathur/setup-php@v2
  21. with:
  22. php-version: "8.0"
  23. coverage: none
  24. - name: Install dependencies
  25. run: composer i
  26. - name: Lint
  27. run: composer run cs:check || ( echo "Please run `composer run cs:fix` to format your code" && exit 1 )