Skip to content

Commit 43c677d

Browse files
Merge pull request #50953 from nextcloud/backport/50949/stable31
[stable31] ci(autochecks): Run some autochecks also on non-PHP files
2 parents aef9684 + 5e2b8c2 commit 43c677d

File tree

5 files changed

+39
-4
lines changed

5 files changed

+39
-4
lines changed

.github/workflows/autocheckers.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- 'composer.lock'
3838
- '**.php'
3939
40-
autocheckers:
40+
autoloader:
4141
runs-on: ubuntu-latest
4242

4343
needs: changes
@@ -51,8 +51,9 @@ jobs:
5151

5252
steps:
5353
- name: Checkout server
54-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
54+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5555
with:
56+
persist-credentials: false
5657
submodules: true
5758

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

75+
autocheckers:
76+
runs-on: ubuntu-latest-low
77+
78+
strategy:
79+
matrix:
80+
php-versions: ['8.1']
81+
82+
name: Translation and Files checkers
83+
84+
steps:
85+
- name: Checkout server
86+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
87+
with:
88+
persist-credentials: false
89+
submodules: true
90+
91+
- name: Set up php ${{ matrix.php-versions }}
92+
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 #v2.32.0
93+
with:
94+
php-version: ${{ matrix.php-versions }}
95+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
96+
coverage: none
97+
ini-file: development
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
74101
- name: Check translations are JSON decodeable
75102
run: php ./build/translation-checker.php
76103

@@ -87,12 +114,12 @@ jobs:
87114
permissions:
88115
contents: none
89116
runs-on: ubuntu-latest-low
90-
needs: [changes, autocheckers]
117+
needs: [changes, autoloader, autocheckers]
91118

92119
if: always()
93120

94121
name: autocheckers-summary
95122

96123
steps:
97124
- name: Summary status
98-
run: if ${{ needs.changes.outputs.src != 'false' && needs.autocheckers.result != 'success' }}; then exit 1; fi
125+
run: if ${{ needs.autocheckers.result != 'success' || (needs.changes.outputs.src != 'false' && needs.autoloader.result != 'success') }}; then exit 1; fi

build/files-checker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
3+
declare(strict_types=1);
24
/**
35
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
46
* SPDX-License-Identifier: AGPL-3.0-or-later

build/htaccess-checker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
3+
declare(strict_types=1);
24
/**
35
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
46
* SPDX-License-Identifier: AGPL-3.0-or-later

build/translation-checker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
3+
declare(strict_types=1);
24
/**
35
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
46
* SPDX-License-Identifier: AGPL-3.0-or-later

build/triple-dot-checker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
3+
declare(strict_types=1);
24
/**
35
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
46
* SPDX-License-Identifier: AGPL-3.0-or-later

0 commit comments

Comments
 (0)