Skip to content

Commit

Permalink
Merge pull request #10 from TappNetwork/l9-support
Browse files Browse the repository at this point in the history
Laravel 9 Support
  • Loading branch information
swilla authored Feb 21, 2022
2 parents 5931650 + 3199c97 commit d04a73a
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHPStan

on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
pull_request:
paths:
- '**.php'
- 'phpstan.neon.dist'


jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v1

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
45 changes: 45 additions & 0 deletions .github/workflows/run-tests-l8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Run Tests - Current"

on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1, 8.0]
laravel: [9.*, 8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
# - name: Execute tests
# run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"php": "^7.4|^8.0",
"aws/aws-sdk-php": "^3.171",
"spatie/laravel-package-tools": "^1.1",
"illuminate/contracts": "^8.0"
"illuminate/contracts": "^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "^6.0",
"orchestra/testbench": "^6.0|^7.0",
"phpunit/phpunit": "^9.3",
"spatie/laravel-ray": "^1.9",
"vimeo/psalm": "^4.4"
Expand Down

0 comments on commit d04a73a

Please sign in to comment.