Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Commit 1e02006

Browse files
authored
Merge pull request #3 from maksiuP/workflow
Enable test workflow for PHP 7.4 and 8.0
2 parents c3d81fe + ddf0a22 commit 1e02006

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

.github/workflows/php.yml

+32-21
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,37 @@ on:
99
jobs:
1010
build:
1111

12-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
php: [ 8.0, 7.4]
17+
18+
name: PHP ${{ matrix.php }} - ${{ matrix.os }}
1319

1420
steps:
15-
- uses: actions/checkout@v2
16-
17-
- name: Validate composer.json and composer.lock
18-
run: composer validate
19-
20-
- name: Cache Composer packages
21-
id: composer-cache
22-
uses: actions/cache@v2
23-
with:
24-
path: vendor
25-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
26-
restore-keys: |
27-
${{ runner.os }}-php-
28-
29-
- name: Install dependencies
30-
if: steps.composer-cache.outputs.cache-hit != 'true'
31-
run: composer install --prefer-dist --no-progress --no-suggest
32-
33-
- name: Run test suite
34-
run: composer run-script test
21+
- uses: actions/checkout@v2
22+
23+
- name: Cache Composer packages
24+
id: composer-cache
25+
uses: actions/cache@v2
26+
with:
27+
path: vendor
28+
key: ${{ matrix.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: |
30+
${{ matrix.os }}-php-
31+
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
37+
- name: Validate composer.json and composer.lock
38+
run: composer validate
39+
40+
- name: Install dependencies
41+
if: steps.composer-cache.outputs.cache-hit != 'true'
42+
run: composer install --prefer-dist --no-progress --no-interaction
43+
44+
- name: Run test suite
45+
run: composer run-script test

0 commit comments

Comments
 (0)