Skip to content

Commit

Permalink
Improves Nova 5 Support (#187)
Browse files Browse the repository at this point in the history
* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Use Nova Workbench

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Fix styling

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: crynobone <[email protected]>
  • Loading branch information
crynobone and crynobone authored Dec 30, 2024
1 parent ad263c8 commit 5b8c6e0
Show file tree
Hide file tree
Showing 32 changed files with 14,125 additions and 6,349 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.0]
laravel: [9.*, 8.*]
php: [8.4, 8.3, 8.2, 8.1, 8.0]
laravel: [11.*, 10.*]
dependency-version: [prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
exclude:
- php: 8.4
laravel: 10.*
- php: 8.0
laravel: 11.*

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

Expand Down Expand Up @@ -49,12 +49,15 @@ jobs:
- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}"
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --with="laravel/framework:${{ matrix.laravel }}"
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

- name: Execute tests
run: vendor/bin/phpunit
env:
DB_CONNECTION: 'mysql'
DB_USERNAME: 'root'
DB_DATABASE: 'nova_tags_field'
DB_HOST: '127.0.0.1'
DB_PORT: ${{ job.services.mysql.ports[3306] }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/vendor
/node_modules
auth.json
package-lock.json
composer.phar
composer.lock
phpunit.xml
mix-manifest.json
phpunit.xml
yarn.lock
.php_cs.cache
.php-cs-fixer.cache
34 changes: 27 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
],
"require": {
"php": "^8.0",
"laravel/nova": "^5.0",
"nova-kit/nova-packages-tool": "^2.0",
"laravel/nova": "^5.0.6",
"spatie/laravel-tags": "^4.0"
},
"require-dev": {
"mockery/mockery": "^1.4",
"orchestra/testbench": "^6.24|^7.0",
"phpunit/phpunit": "^9.4"
"laravel/nova-devtool": "^1.2",
"orchestra/testbench": "^8.30|^9.8"
},
"autoload": {
"psr-4": {
Expand All @@ -38,7 +36,10 @@
},
"autoload-dev": {
"psr-4": {
"Spatie\\TagsField\\Tests\\": "tests"
"Spatie\\TagsField\\Tests\\": "tests",
"Workbench\\App\\": "workbench/app/",
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
}
},
"extra": {
Expand All @@ -52,5 +53,24 @@
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"@clear",
"@prepare"
],
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": "@php vendor/bin/testbench workbench:build --ansi",
"serve": [
"Composer\\Config::disableProcessTimeout",
"@build",
"@php vendor/bin/testbench serve --ansi"
],
"test": [
"@clear",
"@php vendor/bin/testbench package:create-sqlite-db",
"@php vendor/bin/phpunit"
]
}
}
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

33 changes: 0 additions & 33 deletions nova.mix.js

This file was deleted.

Loading

0 comments on commit 5b8c6e0

Please sign in to comment.