|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | basic-tests: |
11 | | - name: Syntax and unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }} |
| 11 | + name: Unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }} |
12 | 12 | runs-on: ${{ matrix.operating-system }} |
13 | 13 | strategy: |
14 | 14 | fail-fast: false |
|
59 | 59 | - name: Install Composer dependencies |
60 | 60 | run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader |
61 | 61 |
|
62 | | - - name: Syntax check PHP |
63 | | - run: bash vendor/bin/check-syntax-php.sh |
64 | | - |
65 | 62 | - name: Decide whether to run code coverage or not |
66 | 63 | if: ${{ matrix.php-versions != '8.3' || matrix.operating-system != 'ubuntu-latest' }} |
67 | 64 | run: | |
@@ -115,38 +112,28 @@ jobs: |
115 | 112 | - name: Security check for updated dependencies |
116 | 113 | uses: symfonycorp/security-checker-action@v5 |
117 | 114 |
|
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 |
| 115 | + phplinter: |
| 116 | + name: 'PHP-Linter' |
| 117 | + strategy: |
| 118 | + fail-fast: false |
| 119 | + matrix: |
| 120 | + php-version: ['8.3', '8.4', '8.5'] |
134 | 121 |
|
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- |
| 122 | + uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0 |
| 123 | + with: |
| 124 | + php-version: ${{ matrix.php-version }} |
141 | 125 |
|
142 | | - - name: Install Composer dependencies |
143 | | - run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader |
| 126 | + linter: |
| 127 | + name: 'Linter' |
| 128 | + strategy: |
| 129 | + fail-fast: false |
144 | 130 |
|
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 |
| 131 | + uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0 |
| 132 | + with: |
| 133 | + enable_eslinter: false |
| 134 | + enable_jsonlinter: true |
| 135 | + enable_stylelinter: false |
| 136 | + enable_yamllinter: true |
150 | 137 |
|
151 | 138 | quality: |
152 | 139 | name: Quality control |
|
0 commit comments