Skip to content

Commit

Permalink
Merge pull request nextcloud#50949 from nextcloud/ci/noid/run-some-au…
Browse files Browse the repository at this point in the history
…tochecks-also-on-non-php-files

ci(autochecks): Run some autochecks also on non-PHP files
  • Loading branch information
nickvergessen authored Feb 21, 2025
2 parents 1fc458b + 0fc355a commit 6abd12c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/autocheckers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- 'composer.lock'
- '**.php'
autocheckers:
autoloader:
runs-on: ubuntu-latest

needs: changes
Expand All @@ -51,8 +51,9 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
submodules: true

- name: Set up php ${{ matrix.php-versions }}
Expand All @@ -71,6 +72,32 @@ jobs:
- name: Check auto loaders
run: bash ./build/autoloaderchecker.sh

autocheckers:
runs-on: ubuntu-latest-low

strategy:
matrix:
php-versions: ['8.1']

name: Translation and Files checkers

steps:
- name: Checkout server
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
submodules: true

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 #v2.32.0
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check translations are JSON decodeable
run: php ./build/translation-checker.php

Expand All @@ -87,12 +114,12 @@ jobs:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: [changes, autocheckers]
needs: [changes, autoloader, autocheckers]

if: always()

name: autocheckers-summary

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.autocheckers.result != 'success' }}; then exit 1; fi
run: if ${{ needs.autocheckers.result != 'success' || (needs.changes.outputs.src != 'false' && needs.autoloader.result != 'success') }}; then exit 1; fi
2 changes: 2 additions & 0 deletions build/files-checker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
2 changes: 2 additions & 0 deletions build/htaccess-checker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
2 changes: 2 additions & 0 deletions build/translation-checker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
2 changes: 2 additions & 0 deletions build/triple-dot-checker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down

0 comments on commit 6abd12c

Please sign in to comment.