Skip to content

Commit 70a5d7e

Browse files
committed
test against a few versions of php
1 parent 45097ea commit 70a5d7e

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

.github/workflows/php.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,34 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
build:
12+
run:
13+
runs-on: ${{ matrix.operating-system }}
14+
strategy:
15+
matrix:
16+
operating-system: [ubuntu-latest]
17+
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1318

14-
runs-on: ubuntu-latest
19+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1520

1621
steps:
17-
- uses: actions/checkout@v4
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php-versions }}
29+
30+
- name: Check PHP Version
31+
run: php -v
1832

1933
- name: Validate composer.json and composer.lock
2034
run: composer validate --strict
2135

22-
- name: Cache Composer packages
23-
id: composer-cache
24-
uses: actions/cache@v3
25-
with:
26-
path: vendor
27-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-php-
30-
3136
- name: Install dependencies
3237
run: composer install --prefer-dist --no-progress
3338

34-
- name: Run test suite
39+
- name: Run lint check
3540
run: composer run-script lint
3641

3742
- name: Run test suite

0 commit comments

Comments
 (0)