Skip to content

Commit 5f02a49

Browse files
authored
Merge pull request #4 from gofish543/laravel8.0
Updating to laravel 8.0
2 parents 77526dd + d6bae43 commit 5f02a49

File tree

2 files changed

+36
-22
lines changed

2 files changed

+36
-22
lines changed

.github/workflows/phpunit.yml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,48 @@
11
name: PHP Tests
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: [push, pull_request]
84

95
jobs:
10-
build:
11-
12-
runs-on: ubuntu-latest
6+
test:
7+
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: true
11+
matrix:
12+
os: [ubuntu-latest]
13+
php: [7.4]
14+
laravel: [8.*, 7.*]
15+
dependency-version: [prefer-lowest, prefer-stable]
16+
include:
17+
- laravel: 8.*
18+
testbench: 6.*
19+
- laravel: 7.*
20+
testbench: 5.*
21+
22+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
1323

1424
steps:
15-
- uses: actions/checkout@v2
16-
17-
- name: Validate composer.json and composer.lock
18-
run: composer validate
25+
- name: Checkout code
26+
uses: actions/checkout@v2
1927

2028
- name: Cache Composer packages
2129
id: composer-cache
2230
uses: actions/cache@v2
2331
with:
24-
path: vendor
25-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
26-
restore-keys: |
27-
${{ runner.os }}-php-
32+
path: ~/.composer/cache/files
33+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php }}
39+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
40+
coverage: none
2841

2942
- name: Install dependencies
30-
if: steps.composer-cache.outputs.cache-hit != 'true'
31-
run: composer install --prefer-dist --no-progress --no-suggest
43+
run: |
44+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
45+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
3246
33-
- name: Run test suite
34-
run: ./vendor/bin/phpunit
47+
- name: Execute test suite
48+
run: ./vendor/bin/phpunit

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"require": {
2222
"php": "^7.3",
23-
"illuminate/database": "^7.0",
24-
"illuminate/support": "^7.0"
23+
"illuminate/database": "^7.0 | ^8.0",
24+
"illuminate/support": "^7.0 | ^8.0"
2525
},
2626
"require-dev": {
2727
"orchestra/testbench": "^5.2",

0 commit comments

Comments
 (0)