Skip to content

Commit b469372

Browse files
authored
Update php.yml
1 parent 5ebccf7 commit b469372

File tree

1 file changed

+12
-26
lines changed

1 file changed

+12
-26
lines changed

.github/workflows/php.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,19 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
10+
phpunit:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
php: [7.0, 7.1, 7.2, 7.3, 7.4]
1215
steps:
13-
- uses: actions/checkout@v2
14-
- name: Cache Composer packages
15-
id: composer-cache
16-
uses: actions/cache@v2
16+
- uses: actions/checkout@v1
17+
- uses: shivammathur/setup-php@v2
1718
with:
18-
path: vendor
19-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
20-
restore-keys: |
21-
${{ runner.os }}-php-
22-
- name: Install dependencies
23-
if: steps.composer-cache.outputs.cache-hit != 'true'
19+
php-version: ${{ matrix.php }}
20+
- name: Validate Composer files
21+
run: composer validate --no-check-all --strict
22+
- name: Install Composer dependencies
2423
run: composer install --prefer-dist --no-progress --no-suggest
25-
- name: PHP 7.0 Test
26-
uses: uses "LupeCode/gh-action-php@master"
27-
run: php7.0 vendor/bin/phpunit
28-
- name: PHP 7.1 Test
29-
uses: uses "LupeCode/gh-action-php@master"
30-
run: php7.1 vendor/bin/phpunit
31-
- name: PHP 7.2 Test
32-
uses: uses "LupeCode/gh-action-php@master"
33-
run: php7.2 vendor/bin/phpunit
34-
- name: PHP 7.3 Test
35-
uses: uses "LupeCode/gh-action-php@master"
36-
run: php7.3 vendor/bin/phpunit
37-
- name: PHP 7.4 Test
38-
uses: uses "LupeCode/gh-action-php@master"
39-
run: php7.4 vendor/bin/phpunit
24+
- name: Run tests
25+
run: php vendor/bin/phpunit

0 commit comments

Comments
 (0)