Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Tests #27

Merged
merged 5 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)



<a href="https://www.buymeacoffee.com/takielias" target="_blank"> <img align="left" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="50" width="210" alt="takielias" /></a>

<br/>
Expand All @@ -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|
Expand All @@ -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

Expand Down
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
26 changes: 11 additions & 15 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
colors="true" processIsolation="false" stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Package">
<directory suffix=".php">./tests/</directory>
<directory suffix=".php">./tests/Components</directory>
<exclude>tests/Components/ComponentTestCase.php</exclude>

</testsuite>
</testsuites>
<filter>
<whitelist>
<source>
<include>
<directory>src/</directory>
</whitelist>
</filter>
</include>
</source>
</phpunit>
4 changes: 2 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});