Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Commit 8b3de92

Browse files
committed
v2.0
Remove JS tests
1 parent c8e2164 commit 8b3de92

File tree

143 files changed

+26269
-42792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+26269
-42792
lines changed

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
extends: [
3+
"eslint:recommended",
4+
"plugin:vue/vue3-recommended",
5+
"plugin:vue/vue3-essential",
6+
"plugin:vue/vue3-strongly-recommended"
7+
],
8+
rules: {
9+
"no-undef": 0,
10+
"vue/multi-word-component-names": 0,
11+
"vue/no-v-html": 0,
12+
"vue/require-default-prop": 0,
13+
"indent": ["error", 4],
14+
"quotes": ["error", "double"],
15+
}
16+
}

.github/workflows/js.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/php.yml

Lines changed: 72 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,93 @@ jobs:
88
strategy:
99
fail-fast: true
1010
matrix:
11-
php: [8.1, 8.0, 7.4]
12-
laravel: [9.*, 8.*]
11+
php: [8.1, 8.0]
12+
laravel: [9.*]
1313
dependency-version: [prefer-lowest, prefer-stable]
14-
exclude:
15-
- laravel: 9.*
16-
php: 7.4
17-
include:
18-
- laravel: 9.*
19-
testbench: 7.*
20-
- laravel: 8.*
21-
testbench: 6.*
2214

23-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
15+
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
2416

2517
steps:
2618
- name: Checkout code
2719
uses: actions/checkout@v2
2820

21+
- name: Cache node modules
22+
id: cache-npm
23+
uses: actions/cache@v3
24+
env:
25+
cache-name: cache-node-modules
26+
with:
27+
# npm cache files are stored in `~/.npm` on Linux/macOS
28+
path: ~/.npm
29+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
30+
restore-keys: |
31+
${{ runner.os }}-build-${{ env.cache-name }}-
32+
${{ runner.os }}-build-
33+
${{ runner.os }}-
34+
35+
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
36+
name: List the state of node modules
37+
continue-on-error: true
38+
run: npm list
39+
40+
- name: "Install locked dependencies with npm"
41+
run: |
42+
npm ci --ignore-scripts
43+
cd app
44+
npm ci --ignore-scripts
45+
46+
- name: Build package
47+
run: npm run build
48+
2949
- name: Setup PHP
3050
uses: shivammathur/setup-php@v2
3151
with:
3252
php-version: ${{ matrix.php }}
3353
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
3454
coverage: none
3555

36-
- name: Install dependencies
56+
- name: Prepare demo app
3757
run: |
38-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58+
cd app
59+
cp .env.example .env
3960
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
61+
npm run production
62+
touch database/database.sqlite
63+
php artisan migrate:fresh --seed
64+
php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
65+
66+
- name: Start Chrome Driver
67+
run: |
68+
cd app
69+
./vendor/laravel/dusk/bin/chromedriver-linux &
70+
71+
- name: Run Laravel Server
72+
run: |
73+
cd app
74+
php artisan serve &
4075
4176
- name: Execute tests
42-
run: vendor/bin/phpunit
77+
run: |
78+
cd app
79+
php artisan dusk
80+
81+
- name: Upload Screenshots
82+
if: failure()
83+
uses: actions/upload-artifact@v2
84+
with:
85+
name: screenshots
86+
path: app/tests/Browser/screenshots
87+
88+
- name: Upload Console Logs
89+
if: failure()
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: console
93+
path: app/tests/Browser/console
94+
95+
- name: Upload Logs
96+
if: failure()
97+
uses: actions/upload-artifact@v2
98+
with:
99+
name: logs
100+
path: app/storage/logs

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ composer.lock
2727
docs
2828
vendor
2929
coverage
30-
.phpunit.result.cache
30+
.phpunit.result.cache
31+
app/public/css/app.css
32+
app/public/js/app.js
33+
app/public/mix-manifest.json

.php-cs-fixer.php

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
3+
$finder = Symfony\Component\Finder\Finder::create()
4+
->in([
5+
__DIR__ . '/php',
6+
__DIR__ . '/app/app',
7+
__DIR__ . '/app/config',
8+
__DIR__ . '/app/database',
9+
__DIR__ . '/app/lang',
10+
__DIR__ . '/app/routes',
11+
__DIR__ . '/app/tests',
12+
])
13+
->name('*.php')
14+
->ignoreDotFiles(true)
15+
->ignoreVCS(true);
16+
17+
return (new PhpCsFixer\Config())
18+
->setRules([
19+
'@PHP70Migration' => true,
20+
'@PHP71Migration' => true,
21+
'@PHP73Migration' => true,
22+
'@PHP74Migration' => true,
23+
'@PHP80Migration' => true,
24+
'@PSR2' => true,
25+
'array_indentation' => true,
26+
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
27+
'blank_line_before_statement' => ['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try']],
28+
'class_attributes_separation' => ['elements' => ['method' => 'one']],
29+
'concat_space' => ['spacing' => 'one'],
30+
'increment_style' => ['style' => 'post'],
31+
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline', 'keep_multiple_spaces_after_comma' => true],
32+
'method_chaining_indentation' => true,
33+
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
34+
'no_extra_blank_lines' => true,
35+
'no_trailing_comma_in_singleline_array' => true,
36+
'no_unused_imports' => true,
37+
'no_whitespace_before_comma_in_array' => true,
38+
'not_operator_with_successor_space' => true,
39+
'ordered_imports' => true,
40+
'phpdoc_scalar' => true,
41+
'phpdoc_single_line_var_spacing' => true,
42+
'phpdoc_var_without_name' => true,
43+
'return_type_declaration' => ['space_before' => 'none'],
44+
'semicolon_after_instruction' => false,
45+
'simple_to_complex_string_variable' => true,
46+
'strict_comparison' => true,
47+
'ternary_operator_spaces' => true,
48+
'trailing_comma_in_multiline' => true,
49+
'trim_array_spaces' => true,
50+
'unary_operator_spaces' => true,
51+
'yoda_style' => false,
52+
])
53+
->setFinder($finder)
54+
->setRiskyAllowed(true)
55+
->setUsingCache(false);

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
77
![run-tests](https://github.com/protonemedia/inertiajs-tables-laravel-query-builder/workflows/run-tests/badge.svg)
88

9-
This package provides a *DataTables-like* experience for [Inertia.js](https://inertiajs.com/) with support for searching, filtering, sorting, toggling columns, and pagination. It generates URLs that can be consumed by Spatie's excellent [Laravel Query Builder](https://github.com/spatie/laravel-query-builder) package, with no additional logic needed. The components are styled with [Tailwind CSS 2.0](https://tailwindcss.com/), but it's fully customizable and you can bring your own components. The data refresh logic is based on Inertia's [Ping CRM demo](https://github.com/inertiajs/pingcrm).
9+
This package provides a *DataTables-like* experience for [Inertia.js](https://inertiajs.com/) with support for searching, filtering, sorting, toggling columns, and pagination. It generates URLs that can be consumed by Spatie's excellent [Laravel Query Builder](https://github.com/spatie/laravel-query-builder) package, with no additional logic needed. The components are styled with [Tailwind CSS 3.0](https://tailwindcss.com/), but it's fully customizable and you can bring your own components. The data refresh logic is based on Inertia's [Ping CRM demo](https://github.com/inertiajs/pingcrm).
1010

1111
![Inertia.js Table for Laravel Query Builder](https://user-images.githubusercontent.com/8403149/113340981-e3863680-932c-11eb-8017-7a6588916508.mp4)
1212

@@ -30,11 +30,11 @@ We proudly support the community by developing Laravel packages and giving them
3030

3131
## Compatibility
3232

33-
* [Vue 2.6](https://vuejs.org/v2/guide/installation.html) and [Vue 3](https://v3.vuejs.org/guide/installation.html)
34-
* [Laravel 8 or 9](https://laravel.com/)
33+
* [Vue 3](https://v3.vuejs.org/guide/installation.html)
34+
* [Laravel 9](https://laravel.com/)
3535
* [Inertia.js](https://inertiajs.com/)
36-
* [Tailwind CSS v2](https://tailwindcss.com/) + [Forms plugin](https://github.com/tailwindlabs/tailwindcss-forms)
37-
* PHP 7.4 + 8.0 + 8.1
36+
* [Tailwind CSS v3](https://tailwindcss.com/) + [Forms plugin](https://github.com/tailwindlabs/tailwindcss-forms)
37+
* PHP 8.0+
3838

3939
## Roadmap
4040

@@ -46,7 +46,7 @@ We proudly support the community by developing Laravel packages and giving them
4646

4747
## Installation
4848

49-
You need to install both the server-side package as well as the client-side package. Note that this package is only compatible with Laravel 8, Vue 2.6 + 3.0 and requires the Tailwind Forms plugin.
49+
You need to install both the server-side package as well as the client-side package. Note that this package is only compatible with Laravel 9, Vue 3.0 and requires the Tailwind Forms plugin.
5050

5151
### Server-side installation (Laravel)
5252

0 commit comments

Comments
 (0)