Skip to content

Commit 9a27be3

Browse files
committed
Replace bash-scripts with linter-actions
1 parent 051c5de commit 9a27be3

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

.github/workflows/php.yml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -115,38 +115,28 @@ jobs:
115115
- name: Security check for updated dependencies
116116
uses: symfonycorp/security-checker-action@v5
117117

118-
sanity-check:
119-
name: Sanity checks
120-
runs-on: [ubuntu-latest]
121-
122-
steps:
123-
- name: Setup PHP, with composer and extensions
124-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
125-
with:
126-
php-version: '8.3'
127-
extensions: mbstring, xml
128-
coverage: none
129-
130-
- name: Setup problem matchers for PHP
131-
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
132-
133-
- uses: actions/checkout@v3
118+
phplinter:
119+
name: 'PHP-Linter'
120+
strategy:
121+
fail-fast: false
122+
matrix:
123+
php-version: ['8.3', '8.4', '8.5']
134124

135-
- name: Cache composer dependencies
136-
uses: actions/cache@v3
137-
with:
138-
path: $COMPOSER_CACHE
139-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
140-
restore-keys: ${{ runner.os }}-composer-
125+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0
126+
with:
127+
php-version: ${{ matrix.php-version }}
141128

142-
- name: Install Composer dependencies
143-
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
129+
linter:
130+
name: 'Linter'
131+
strategy:
132+
fail-fast: false
144133

145-
- name: Syntax check YAML / XML / JSON
146-
run: |
147-
bash vendor/bin/check-syntax-yaml.sh
148-
bash vendor/bin/check-syntax-xml.sh
149-
bash vendor/bin/check-syntax-json.sh
134+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0
135+
with:
136+
enable_eslinter: false
137+
enable_jsonlinter: true
138+
enable_stylelinter: false
139+
enable_yamllinter: true
150140

151141
quality:
152142
name: Quality control

tools/linters/.yaml-lint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
3+
extends: default
4+
5+
rules:
6+
line-length:
7+
max: 120

0 commit comments

Comments
 (0)