Skip to content

Commit bf9ec37

Browse files
nickvergessenbackportbot[bot]
authored andcommitted
ci(autochecks): Run some autochecks also on non-PHP files
Signed-off-by: Joas Schilling <coding@schilljs.com> [skip ci]
1 parent be4cad2 commit bf9ec37

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

.github/workflows/autocheckers.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- 'composer.lock'
3636
- '**.php'
3737
38-
autocheckers:
38+
autoloader:
3939
runs-on: ubuntu-latest
4040

4141
needs: changes
@@ -51,6 +51,7 @@ jobs:
5151
- name: Checkout server
5252
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5353
with:
54+
persist-credentials: false
5455
submodules: true
5556

5657
- name: Set up php ${{ matrix.php-versions }}
@@ -69,6 +70,32 @@ jobs:
6970
- name: Check auto loaders
7071
run: bash ./build/autoloaderchecker.sh
7172

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

@@ -85,12 +112,12 @@ jobs:
85112
permissions:
86113
contents: none
87114
runs-on: ubuntu-latest-low
88-
needs: [changes, autocheckers]
115+
needs: [changes, autoloader, autocheckers]
89116

90117
if: always()
91118

92119
name: autocheckers-summary
93120

94121
steps:
95122
- name: Summary status
96-
run: if ${{ needs.changes.outputs.src != 'false' && needs.autocheckers.result != 'success' }}; then exit 1; fi
123+
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
* @copyright Copyright (c) 2017 Morris Jobke <hey@morrisjobke.de>
46
*

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
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
46
*

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
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
46
* @copyright Copyright (c) 2020 Gary Kim <gary@garykim.dev>

0 commit comments

Comments
 (0)