|
| 1 | +name: Code checkers |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | +permissions: |
| 7 | + contents: read |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: autocheckers-${{ github.head_ref || github.run_id }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + changes: |
| 15 | + runs-on: ubuntu-latest-low |
| 16 | + |
| 17 | + outputs: |
| 18 | + src: ${{ steps.changes.outputs.src }} |
| 19 | + |
| 20 | + steps: |
| 21 | + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 |
| 22 | + id: changes |
| 23 | + continue-on-error: true |
| 24 | + with: |
| 25 | + filters: | |
| 26 | + src: |
| 27 | + - '.github/workflows/**' |
| 28 | + - '3rdparty/**' |
| 29 | + - '**/appinfo/**' |
| 30 | + - '**/lib/**' |
| 31 | + - '**/templates/**' |
| 32 | + - 'vendor/**' |
| 33 | + - 'vendor-bin/**' |
| 34 | + - 'composer.json' |
| 35 | + - 'composer.lock' |
| 36 | + - '**.php' |
| 37 | +
|
| 38 | + autocheckers: |
| 39 | + runs-on: ubuntu-latest |
| 40 | + |
| 41 | + needs: changes |
| 42 | + if: needs.changes.outputs.src != 'false' |
| 43 | + |
| 44 | + strategy: |
| 45 | + matrix: |
| 46 | + php-versions: ['8.3'] |
| 47 | + |
| 48 | + name: PHP checkers |
| 49 | + |
| 50 | + steps: |
| 51 | + - name: Checkout server |
| 52 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
| 53 | + with: |
| 54 | + submodules: true |
| 55 | + |
| 56 | + - name: Set up php ${{ matrix.php-versions }} |
| 57 | + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 |
| 58 | + with: |
| 59 | + php-version: ${{ matrix.php-versions }} |
| 60 | + extensions: ctype, json, mbstring |
| 61 | + coverage: none |
| 62 | + ini-file: development |
| 63 | + env: |
| 64 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + |
| 66 | + - name: Set up dependencies |
| 67 | + run: composer i |
| 68 | + |
| 69 | + - name: Check auto loaders |
| 70 | + run: bash ./build/autoloaderchecker.sh |
| 71 | + |
| 72 | + - name: Check translations are JSON decodeable |
| 73 | + run: php ./build/translation-checker.php |
| 74 | + |
| 75 | + - name: Check translations do not contain triple dot but ellipsis |
| 76 | + run: php ./build/triple-dot-checker.php |
| 77 | + |
| 78 | + - name: Check .htaccess does not contain invalid changes |
| 79 | + run: php ./build/htaccess-checker.php |
| 80 | + |
| 81 | + - name: Check that all and only expected files are included |
| 82 | + run: php ./build/files-checker.php |
| 83 | + |
| 84 | + summary: |
| 85 | + permissions: |
| 86 | + contents: none |
| 87 | + runs-on: ubuntu-latest-low |
| 88 | + needs: [changes, autocheckers] |
| 89 | + |
| 90 | + if: always() |
| 91 | + |
| 92 | + name: autocheckers-summary |
| 93 | + |
| 94 | + steps: |
| 95 | + - name: Summary status |
| 96 | + run: if ${{ needs.changes.outputs.src != 'false' && needs.autocheckers.result != 'success' }}; then exit 1; fi |
0 commit comments