Skip to content

Commit f20a85a

Browse files
committed
Replace super-linter with a reusable workflow
1 parent 6efa1c4 commit f20a85a

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

.github/workflows/php.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,32 @@ on: # yamllint disable-line rule:truthy
1414
workflow_dispatch:
1515

1616
jobs:
17+
phplinter:
18+
name: 'PHP-Linter'
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
php-version: ['8.1', '8.2', '8.3', '8.4']
23+
24+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/[email protected]
25+
with:
26+
php-version: ${{ matrix.php-version }}
27+
1728
linter:
18-
name: Linter
19-
runs-on: ['ubuntu-latest']
29+
name: 'Linter'
30+
strategy:
31+
fail-fast: false
2032

21-
steps:
22-
- uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
26-
- name: Lint Code Base
27-
uses: super-linter/super-linter/slim@v7
28-
env:
29-
SAVE_SUPER_LINTER_OUTPUT: false
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
LINTER_RULES_PATH: 'tools/linters'
32-
LOG_LEVEL: NOTICE
33-
VALIDATE_ALL_CODEBASE: true
34-
VALIDATE_CSS: true
35-
VALIDATE_JAVASCRIPT_ES: true
36-
VALIDATE_JSON: true
37-
VALIDATE_PHP_BUILTIN: true
38-
VALIDATE_YAML: true
39-
VALIDATE_XML: true
40-
VALIDATE_GITHUB_ACTIONS: true
33+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/[email protected]
34+
with:
35+
enable_eslinter: false
36+
enable_jsonlinter: true
37+
enable_stylelinter: false
38+
enable_yamllinter: true
4139

4240
quality:
4341
name: Quality control
42+
needs: [unit-tests-linux]
4443
runs-on: [ubuntu-latest]
4544

4645
steps:
@@ -109,7 +108,9 @@ jobs:
109108
110109
security:
111110
name: Security checks
111+
needs: [unit-tests-linux]
112112
runs-on: [ubuntu-latest]
113+
113114
steps:
114115
- name: Setup PHP, with composer and extensions
115116
# https://github.com/shivammathur/setup-php
@@ -151,7 +152,7 @@ jobs:
151152
unit-tests-linux:
152153
name: "Unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
153154
runs-on: ${{ matrix.operating-system }}
154-
needs: [linter, quality, security]
155+
needs: [phplinter, linter]
155156
strategy:
156157
fail-fast: false
157158
matrix:
@@ -216,7 +217,7 @@ jobs:
216217
unit-tests-windows:
217218
name: "Unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
218219
runs-on: ${{ matrix.operating-system }}
219-
needs: [linter, quality, security]
220+
needs: [phplinter, linter]
220221
strategy:
221222
fail-fast: true
222223
matrix:

0 commit comments

Comments
 (0)