1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-01-17 13:18:21 +01:00

Enable tests for Node 14 and PHP 8, optimize PHP CS config

This commit is contained in:
Kovah 2020-11-17 19:40:25 +01:00
parent 1aeed1a021
commit ba07e144f0
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B
4 changed files with 10 additions and 6 deletions

View File

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: [12.x] node-version: ['12.x', '14.x']
name: Test asset generation process on Node ${{ matrix.node-version }} name: Test asset generation process on Node ${{ matrix.node-version }}
@ -40,7 +40,7 @@ jobs:
strategy: strategy:
matrix: matrix:
operating-system: [ubuntu-latest] operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4'] php-versions: ['7.3', '7.4', '8.0']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

View File

@ -62,7 +62,7 @@
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi" "@php artisan package:discover --ansi"
], ],
"lint": "./vendor/bin/phpcs", "lint": "./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1",
"test": "./vendor/bin/phpunit", "test": "./vendor/bin/phpunit",
"code-coverage": "./vendor/bin/phpunit --coverage-clover test-coverage.xml" "code-coverage": "./vendor/bin/phpunit --coverage-clover test-coverage.xml"
}, },

View File

@ -6,6 +6,7 @@ use App\Models\Link;
use App\Models\LinkList; use App\Models\LinkList;
use App\Models\Tag; use App\Models\Tag;
use App\Models\User; use App\Models\User;
use Exception;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class ExampleSeeder extends Seeder class ExampleSeeder extends Seeder
@ -14,8 +15,9 @@ class ExampleSeeder extends Seeder
* Run the database seeds. * Run the database seeds.
* *
* @return void * @return void
* @throws Exception
*/ */
public function run() public function run(): void
{ {
// Generate users, categories and tags // Generate users, categories and tags
User::factory()->create(); User::factory()->create();

View File

@ -4,16 +4,18 @@
<!-- Check the theme folder --> <!-- Check the theme folder -->
<file>./app</file> <file>./app</file>
<file>./database/factories</file>
<file>./database/seeders</file>
<file>./tests</file> <file>./tests</file>
<!-- Enable the PSR-2 Code Standard rules --> <!-- Enable the PSR-2 Code Standard rules -->
<rule ref="PSR2"/> <rule ref="PSR2"/>
<!-- Prevent warnings for lines that contain more than 80 characters, only enforce the hard cap --> <!-- Prevent warnings for lines that contain more than 80 characters -->
<rule ref="Generic.Files.LineLength"> <rule ref="Generic.Files.LineLength">
<properties> <properties>
<property name="lineLimit" value="120"/> <property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="120"/> <property name="absoluteLineLimit" value="0"/>
</properties> </properties>
</rule> </rule>
</ruleset> </ruleset>