autocheckers.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. name: Code checkers
  2. on:
  3. pull_request:
  4. permissions:
  5. contents: read
  6. concurrency:
  7. group: autocheckers-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. changes:
  11. runs-on: ubuntu-latest-low
  12. outputs:
  13. src: ${{ steps.changes.outputs.src }}
  14. steps:
  15. - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
  16. id: changes
  17. continue-on-error: true
  18. with:
  19. filters: |
  20. src:
  21. - '.github/workflows/**'
  22. - '3rdparty/**'
  23. - '**/appinfo/**'
  24. - '**/lib/**'
  25. - '**/templates/**'
  26. - 'vendor/**'
  27. - 'vendor-bin/**'
  28. - 'composer.json'
  29. - 'composer.lock'
  30. - '**.php'
  31. autocheckers:
  32. runs-on: ubuntu-latest
  33. needs: changes
  34. if: needs.changes.outputs.src != 'false'
  35. strategy:
  36. matrix:
  37. php-versions: ['8.3']
  38. name: PHP checkers
  39. steps:
  40. - name: Checkout server
  41. uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  42. with:
  43. submodules: true
  44. - name: Set up php ${{ matrix.php-versions }}
  45. uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
  46. with:
  47. php-version: ${{ matrix.php-versions }}
  48. extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
  49. coverage: none
  50. ini-file: development
  51. env:
  52. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  53. - name: Set up dependencies
  54. run: composer i
  55. - name: Check auto loaders
  56. run: bash ./build/autoloaderchecker.sh
  57. - name: Check translations are JSON decodeable
  58. run: php ./build/translation-checker.php
  59. - name: Check translations do not contain triple dot but ellipsis
  60. run: php ./build/triple-dot-checker.php
  61. - name: Check .htaccess does not contain invalid changes
  62. run: php ./build/htaccess-checker.php
  63. - name: Check that all and only expected files are included
  64. run: php ./build/files-checker.php
  65. summary:
  66. permissions:
  67. contents: none
  68. runs-on: ubuntu-latest-low
  69. needs: [changes, autocheckers]
  70. if: always()
  71. name: autocheckers-summary
  72. steps:
  73. - name: Summary status
  74. run: if ${{ needs.changes.outputs.src != 'false' && needs.autocheckers.result != 'success' }}; then exit 1; fi