Skip to content

Commit d24e244

Browse files
authored
feat: running php sdk tests against laravel 8 (#92)
* feat: running php sdk tests against laravel 8 * ci: attempting to exclude php 7.2 tests running on laravel 8 * ci: splitting the jobs up for laravel 8 * ci: php workflow cleanup
1 parent 64b6999 commit d24e244

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

.github/workflows/php.yml

+43-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,49 @@ jobs:
1515
php: [7.2, 7.3, 7.4]
1616
laravel: [6.*, 7.*]
1717
dependency-version: [prefer-lowest, prefer-stable]
18-
include:
19-
- laravel: 7.*
20-
- laravel: 6.*
18+
19+
name: build (${{ matrix.php }} w/ Laravel ${{ matrix.laravel }} @${{ matrix.dependency-version }})
20+
21+
steps:
22+
- uses: actions/[email protected]
23+
24+
- name: Cache dependencies
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.composer/cache/files
28+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
35+
- name: Install dependencies
36+
run: |
37+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
38+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
39+
40+
- name: Check code standards
41+
run: composer run-script lint
42+
43+
- name: Execute static analysis
44+
run: composer run-script psalm
45+
46+
- name: Run tests
47+
run: composer run-script phpunit
48+
49+
test-laravel8:
50+
runs-on: ubuntu-latest
51+
defaults:
52+
run:
53+
working-directory: packages/php
54+
55+
strategy:
56+
fail-fast: true
57+
matrix:
58+
php: [7.3, 7.4]
59+
laravel: [8.*]
60+
dependency-version: [prefer-lowest, prefer-stable]
2161

2262
name: build (${{ matrix.php }} w/ Laravel ${{ matrix.laravel }} @${{ matrix.dependency-version }})
2363

packages/php/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
],
1616
"require": {
1717
"php": "^7.2",
18-
"illuminate/http": "^6.8 | ^7.0",
19-
"illuminate/support": "^6.8 | ^7.0",
18+
"illuminate/http": "^6.8 | ^7.0 | ^8.0",
19+
"illuminate/support": "^6.8 | ^7.0 | ^8.0",
2020
"ocramius/package-versions": "^1.4",
2121
"ramsey/uuid": "^3.7 | ^4.0",
2222
"composer/composer": "^1.10",

0 commit comments

Comments
 (0)