Skip to content

Commit

Permalink
Adjust tests and Laravel support (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored Nov 8, 2022
1 parent a5a028f commit 0a777bd
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 37 deletions.
74 changes: 39 additions & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,44 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * *'

jobs:
php-tests:
runs-on: ${{ matrix.os }}

strategy:
matrix:
php: [7.4, 7.3, 7.2]
laravel: [7.*, ^6.10]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- laravel: 7.*
testbench: 5.*
- laravel: ^6.10
testbench: ^4.4

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

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

- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" ${{ matrix.additional-deps }} --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
php-tests:
runs-on: ${{ matrix.os }}

strategy:
matrix:
php: [8.1, 8.0, 7.4, 7.3]
laravel: [8.*, 9.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
exclude:
- laravel: 9.*
php: 7.4
- laravel: 9.*
php: 7.3

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --dev --no-interaction --no-update
composer update --${{ matrix.stability }} --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 @@ -3,10 +3,10 @@
"description": "Debug Laravel views",
"license": "MIT",
"require": {
"laravel/framework": "^6.10 || ^7.0 || ^8.0 || ^9.0"
"laravel/framework": "^8.0 || ^9.0"
},
"require-dev": {
"orchestra/testbench": "^5.0"
"orchestra/testbench": "^6.22 || ^7.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 0a777bd

Please sign in to comment.