Package skeleton update
Test / test_all (push) Successful in 17s Details

master
Gertjan Krol 2023-05-28 22:49:45 +02:00
parent 532853e944
commit 25e5682546
12 changed files with 96 additions and 44 deletions

View File

@ -0,0 +1,27 @@
name: Test
on:
push:
branches:
- '*'
jobs:
test_all:
runs-on: ubuntu-22.04
container: git.gertjankrol.nl/docker/php-toolkit:latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: composer install
run: composer install --profile
- name: phpunit
run: composer unit
- name: phplint
run: composer lint
- name: phpcs
run: composer style
- name: composer require check
run: composer require-check
- name: composer security check
run: composer security-check
- name: composer unused package check
run: composer unused-check

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) Author
Copyright (c) 2023 - Gertjan Krol
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -20,10 +20,13 @@ composer require crawl/skeleton
```
### Testing
```bash
composer test
```
- Run PHPUnit: `composer unit`
- Run PHPLint: `composer lint`
- Run PHPCS/PHPCBF: `composer style`/`composer fix-style`
- Run require checker: `composer require-check`
- Run security checker: `composer security-check`
- Check for unused packages: `composer unused-check`
- **Run all tests: `composer test-all`**
### Changelog

View File

@ -1,27 +1,31 @@
{
"name": "crawl/skeleton",
"description": "Crawl Laravel package skeleton",
"license": "MIT",
"type": "library",
"keywords": [
"crawl",
"skeleton"
],
"homepage": "https://git.gertjankrol.nl/crawl/skeleton",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Gertjan Krol",
"email": "hello@gertjankrol.nl"
}
],
"homepage": "https://git.gertjankrol.nl/crawl/skeleton",
"require": {
"php": "^8.1",
"illuminate/support": "^9.25"
"php": "^8.2",
"laravel/framework": "^10.0"
},
"require-dev": {
"crawl/coding-standard": "^1.1",
"enlightn/security-checker": "^1.10",
"crawl/coding-standard": "^1.0",
"ergebnis/composer-normalize": "^2.31",
"icanhazstring/composer-unused": "^0.8.8",
"maglnet/composer-require-checker": "^4.6",
"mockery/mockery": "^1.5",
"orchestra/testbench": "^8.5",
"overtrue/phplint": "^4.3",
"phpunit/phpunit": "^9.5"
},
@ -35,28 +39,39 @@
"Crawl\\Skeleton\\Tests\\": "tests"
}
},
"scripts": {
"lint": "vendor/bin/phplint ./ --exclude=vendor",
"style": "vendor/bin/phpcs --standard=phpcs.xml",
"fix-style": "vendor/bin/phpcbf --standard=phpcs.xml",
"security-checker": "vendor/bin/security-checker security:check composer.lock",
"test": "vendor/bin/phpunit --configuration phpunit.xml --colors=never"
},
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true
},
"optimize-autoloader": true,
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Crawl\\Skeleton\\SkeletonServiceProvider"
],
"aliases": {
"Skeleton": "Crawl\\Skeleton\\SkeletonFacade"
}
},
"providers": [
"Crawl\\Skeleton\\SkeletonServiceProvider"
]
}
},
"scripts": {
"fix-style": "vendor/bin/phpcbf --standard=phpcs.xml",
"lint": "vendor/bin/phplint ./ --exclude=vendor",
"require-check": "vendor/bin/composer-require-checker check composer.json",
"security-check": "vendor/bin/security-checker security:check composer.lock",
"style": "vendor/bin/phpcs --standard=phpcs.xml",
"test-all": [
"composer unit",
"composer lint",
"composer style",
"composer require-check",
"composer security-check",
"composer unused-check"
],
"unit": "vendor/bin/phpunit --configuration phpunit.xml --colors=never",
"unused-check": "vendor/bin/composer-unused"
}
}

View File

@ -4,7 +4,8 @@
"build": "vite build"
},
"devDependencies": {
"laravel-vite-plugin": "^0.5",
"vite": "^3.0"
"laravel-vite-plugin": "^0.7",
"sass": "^1.62",
"vite": "^4.3"
}
}

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<coverage/>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/</directory>
@ -13,4 +9,9 @@
<php>
</php>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

View File

1
public/app.css Normal file
View File

@ -0,0 +1 @@

1
public/app.js Normal file
View File

@ -0,0 +1 @@

View File

@ -1,12 +1,12 @@
{
"resources/js/app.js": {
"file": "app.cdb7ca6c.js",
"src": "resources/js/app.js",
"isEntry": true
"file": "app.js",
"isEntry": true,
"src": "resources/js/app.js"
},
"resources/sass/app.scss": {
"file": "app.923f0842.css",
"src": "resources/sass/app.scss",
"isEntry": true
"file": "app.css",
"isEntry": true,
"src": "resources/sass/app.scss"
}
}

View File

@ -4,7 +4,12 @@ import laravel from 'laravel-vite-plugin';
export default defineConfig({
build: {
outDir: 'public',
assetsDir: '',
rollupOptions: {
output: {
entryFileNames: `[name].js`,
assetFileNames: `[name].[ext]`
},
},
},
plugins: [
laravel({
@ -13,8 +18,6 @@ export default defineConfig({
'resources/js/app.js',
],
refresh: false,
publicDirectory: 'public',
buildDirectory: '.',
}),
],
});