diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4a5dfaa --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Tests + +on: [push, pull_request] + +jobs: + run-tests: + + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ['8.0', '8.1'] + steps: + - uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + - name: Install Dependencies + run: composer update --no-interaction --prefer-source + - name: Create Database + run: | + mkdir -p database + touch database/database.sqlite + - name: Execute tests (Unit and Feature tests) via PHPUnit + env: + DB_CONNECTION: sqlite + DB_DATABASE: database/database.sqlite + run: vendor/bin/phpunit diff --git a/README.md b/README.md index b2d7d52..6f62616 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Laravel Optimistic Locking -![Build Status](http://img.shields.io/travis/reshadman/laravel-optimistic-locking/master.png?style=flat-square) +[![Build Status](https://github.com/42coders/laravel-optimistic-locking/actions/workflows/test.yml/badge.svg)](https://github.com/42coders/laravel-optimistic-locking/actions/workflows/test.yml) Adds optimistic locking feature to Eloquent models. @@ -8,7 +8,7 @@ Adds optimistic locking feature to Eloquent models. composer require reshadman/laravel-optimistic-locking ``` -> This package supports Laravel 5.5.*, 5.6.*, 5.7.*, 5.8.*, 6.* and 7.*. +> This package supports Laravel 5.5.*, 5.6.*, 5.7.*, 5.8.*, 6.*, 7.*, 8.* and 9.*. ## Usage diff --git a/composer.json b/composer.json index c5d3fbb..dbfecfb 100644 --- a/composer.json +++ b/composer.json @@ -11,13 +11,13 @@ ], "require": { "php": "^8.0", - "illuminate/database": "^5.5.0|^6.0|^7.0|^8.0", - "illuminate/support": "^5.5.0|^6.0|^7.0|^8.0" + "illuminate/database": "^5.5.0|^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^5.5.0|^6.0|^7.0|^8.0|^9.0" }, "require-dev": { "ext-pdo_sqlite": "*", "mockery/mockery": "^1.0.0", - "orchestra/testbench": "~3.5.0|~3.6.0|~3.8.0|^4.0|^5.0", + "orchestra/testbench": "~3.5.0|~3.6.0|~3.8.0|^4.0|^5.0|^6.0|^7.0", "phpunit/phpunit" : "^7.0|^8.0|^9.0" }, "autoload": {