Skip to content

Commit

Permalink
Merge pull request #96 from JustSteveKing/feature/github-actions
Browse files Browse the repository at this point in the history
Dropping support for older versions of Laravel
  • Loading branch information
JustSteveKing authored Oct 8, 2021
2 parents a073973 + f87a30c commit 2ca2782
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests

on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [7.4, 8.0]
laravel: [8.*]
dependency-version: [prefer-stable]
include:
- laravel: 8.*
testbench: 6.*

name: PHP ${{ matrix.php }} - LARAVEL ${{ 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, mcrypt
coverage: none

- name: Install Dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute Tests
run: ./vendor/bin/phpunit --testdox
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor/
.idea
composer.lock
.phpunit.result.cache
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
}
],
"require": {
"illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0.0|^7.0.0|^8.0.0",
"illuminate/events": "~5.6.0|~5.7.0|~5.8.0|^6.0.0|^7.0.0|^8.0.0"
"php": "^7.4|^8.0",
"illuminate/database": "^8.0",
"illuminate/events": "^8.0"
},
"require-dev": {
"orchestra/testbench": "~3.6.0|~3.7.0|~3.8.0|^4.0|^5.0|^6.0",
"phpunit/phpunit": "^7.0|^8.0"
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^8.5"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 2ca2782

Please sign in to comment.