Skip to content

Commit 7499737

Browse files
authored
Merge pull request #4 from fireworkweb/laravel-9
Laravel 9 - PHP 8
2 parents a045a57 + cc290ff commit 7499737

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

.github/workflows/run-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,46 @@ jobs:
4545
with:
4646
token: ${{ secrets.CODECOV_TOKEN }}
4747
file: ./coverage.xml
48+
49+
test-php8:
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
fail-fast: true
53+
matrix:
54+
os: [ubuntu-latest, windows-latest]
55+
php: [8.0, 8.1]
56+
laravel: [9.*]
57+
dependency-version: [prefer-stable]
58+
59+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
60+
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v1
64+
65+
- name: Cache dependencies
66+
uses: actions/cache@v1
67+
with:
68+
path: ~/.composer/cache/files
69+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
70+
71+
- name: Setup PHP
72+
uses: shivammathur/setup-php@v2
73+
with:
74+
php-version: ${{ matrix.php }}
75+
extensions: mbstring
76+
coverage: xdebug
77+
78+
- name: Install dependencies
79+
run: |
80+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
81+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
82+
83+
- name: Execute tests
84+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
85+
86+
- name: Upload coverage to Codecov
87+
uses: codecov/codecov-action@v1
88+
with:
89+
token: ${{ secrets.CODECOV_TOKEN }}
90+
file: ./coverage.xml

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
}
2323
],
2424
"require": {
25-
"php": "^7.3",
26-
"illuminate/support": "^5.8|^6.0|^7.0|^8.0"
25+
"php": "^7.3|^8.0",
26+
"illuminate/support": "^5.8|^6.0|^7.0|^8.0|^9.0"
2727
},
2828
"require-dev": {
29-
"orchestra/testbench": "^3.8|^4.0|^5.0|^6.0",
30-
"phpunit/phpunit": "^8.2"
29+
"orchestra/testbench": "^3.8|^4.0|^5.0|^6.0|^7.0",
30+
"phpunit/phpunit": "^8.2|^9.0"
3131
},
3232
"autoload": {
3333
"psr-4": {

0 commit comments

Comments
 (0)