Skip to content

Commit

Permalink
Laravel 9 Support (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher committed Feb 9, 2022
2 parents d0ad9ee + 8c9e7f8 commit f59e6df
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 69 deletions.
73 changes: 10 additions & 63 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,36 @@ on:
- cron: '0 0 * * *'

jobs:
linux_tests:
tests:

runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: forge
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:5.0
ports:
- 6379:6379
options: --entrypoint redis-server
runs-on: ubuntu-18.04
strategy:
fail-fast: true
matrix:
php: [7.3, 7.4]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

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

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

- name: Setup Memcached
uses: niden/actions-memcached@v7

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root

windows_tests:

runs-on: windows-latest
strategy:
fail-fast: true
matrix:
php: [7.3, 7.4]
include:
php: [7.3, 7.4, 8.0, 8.1]
laravel: [6.0, 7.0, 8.0, 9.0]
exclude:
- php: 7.3
stability: prefer-lowest
laravel: 9
- php: 7.4
stability: prefer-stable
laravel: 9

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp
extensions: dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: none
ini-values: memory_limit=512M

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
run: composer update --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
6 changes: 5 additions & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
preset: laravel
php:
preset: laravel
version: 8
disabled:
- no_unused_imports
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
],
"require": {
"php": "^7.3|^8.0",
"illuminate/support": "^8.0",
"illuminate/database": "^8.0"
"illuminate/support": "^7.0|^8.0|^9.0",
"illuminate/database": "^7.0|^8.0|^9.0"
},
"require-dev": {
"illuminate/pagination": "^8.0",
"orchestra/testbench": "^6.3",
"phpunit/phpunit": "^8.4|^9.0"
"illuminate/pagination": "^7.0|^8.0|^9.0",
"orchestra/testbench": "^6.3|^7.0",
"phpunit/phpunit": "^8.4|^9.1"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit f59e6df

Please sign in to comment.