Skip to content

Commit 4b5b908

Browse files
committed
ci: workflow for supported versions
1 parent 1134c46 commit 4b5b908

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

.github/workflows/lint.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
1-
name: Lint
1+
name: Coding standards
22
on: [push]
33
jobs:
44
lint:
5-
name: PHP Lint
5+
name: Coding standards
66
runs-on: ubuntu-latest
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
php: [ '8.0', '8.1', '8.2', '8.3' ]
11+
712
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
816
- name: Setup PHP
917
uses: shivammathur/setup-php@v2
1018
with:
11-
php-version: 8.0
19+
php-version: ${{ matrix.php }}
20+
tools: composer:v2
21+
22+
- name: Setup cache
23+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
1224

13-
- name: Cache Composer dependencies
25+
- name: Cache dependencies installed with composer
1426
uses: actions/cache@v2
1527
with:
16-
path: /tmp/composer-cache
17-
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
28+
path: ${{ env.COMPOSER_CACHE_DIR }}
29+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
30+
restore-keys: |
31+
php${{ matrix.php }}-composer-latest-
32+
33+
- name: Update composer
34+
run: composer self-update
35+
36+
- name: Install dependencies with composer
37+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
1838

19-
- uses: actions/checkout@master
20-
- name: lint
21-
run: make lint
39+
- name: Run code quality analysis
40+
run: make lint

0 commit comments

Comments
 (0)