diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e7a5b62 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Tablar Kit Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + + - name: Create Database + run: | + mkdir -p database + touch database/database.sqlite + + - name: Execute 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 be7949e..14a69e8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ [![Linkedin](https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin&color=rgba(235%2068%2050)&style=for-the-badge)](https://linkedin.com/in/takielias) - takielias
@@ -33,6 +32,7 @@ your experience with Laravel Tablar. Get it [here](https://laravel-news.com/tablar-kit) + Please check the corresponding branch for the documentation. |Version|Branch| @@ -46,7 +46,14 @@ Please check the corresponding branch for the documentation. ### [Demo Project](https://github.com/takielias/tablar-demo-project) -### Demo + +### Installation + +```shell +composer require takielias/tablar-kit +``` + +### Live Demo https://tablar.ebuz.xyz diff --git a/composer.json b/composer.json index c91243f..1bf8e9c 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "illuminate/filesystem": "^10.0|^11.0", "illuminate/support": "^10.0|^11.0", "illuminate/view": "^10.0|^11.0", - "nesbot/carbon": "^2.38", + "nesbot/carbon": "^2.72.2|^3.0", "takielias/tablar": "*" }, "require-dev": { - "phpunit/phpunit": "~9.0", + "phpunit/phpunit": "~10.0", "orchestra/testbench": "~9", "gajus/dindent": "^2.0", "league/commonmark": "^1.4|^2.0", @@ -41,12 +41,7 @@ "autoload-dev": { "psr-4": { "Takielias\\TablarKit\\Tests\\": "tests/" - }, - "classmap": [ - "tests/TestView.php", - "tests/Components/ComponentTestCase.php", - "tests/InteractsWithViews.php" - ] + } }, "extra": { "laravel": { diff --git a/phpunit.xml b/phpunit.xml index ce34605..ac97622 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,22 +1,18 @@ - + - ./tests/ + ./tests/Components + tests/Components/ComponentTestCase.php + - - + + src/ - - + + diff --git a/routes/web.php b/routes/web.php index 2670b35..fe4623f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,6 +11,6 @@ Route::group(['middleware' => config('tablar-kit.middleware', ['web', 'auth'])], function () { - Route::post(config('tablar-kit.filepond.server.url', '/filepond'), [config('tablar-kit.filepond.controller', FilepondController::class), 'process'])->name('filepond-process'); - Route::delete(config('tablar-kit.filepond.server.url', '/filepond'), [config('tablar-kit.filepond.controller', FilepondController::class), 'revert'])->name('filepond-revert'); + Route::post(config('tablar-kit.filepond.server.url', '/filepond'), [config('tablar-kit.filepond.controller', FilepondController::class), 'process'])->name('upload-process'); + Route::delete(config('tablar-kit.filepond.server.url', '/filepond'), [config('tablar-kit.filepond.controller', FilepondController::class), 'revert'])->name('upload-revert'); });