-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gwleuverink/mvp/working
Mvp/working
- Loading branch information
Showing
79 changed files
with
5,233 additions
and
1,165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
022d92c18a4a5a38658ee14dc4af958b26e597cf | ||
63f8c01938730a01258d0e6b8a1325b82d43ce09 | ||
d7e0b956a369047666dfe25eaf29c15f2a74fb92 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: codestyle | ||
|
||
# Commits made in here will not trigger any workflows | ||
# Checkout Duster's documentation for a workaround | ||
|
||
on: | ||
pull_request: | ||
branches: [development, dev, acceptance, staging, main, master] | ||
|
||
jobs: | ||
skip-duplicates: | ||
continue-on-error: true # Uncomment once integration is finished | ||
runs-on: ubuntu-latest | ||
|
||
# Map a step output to a job output | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
|
||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
with: | ||
# All of these options are optional, so you can remove them if you are happy with the defaults | ||
cancel_others: "true" | ||
concurrent_skipping: "same_content" | ||
skip_after_successful_duplicate: "true" | ||
paths_ignore: '["**/README.md", "**/docs/**"]' | ||
|
||
duster-fix: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
- run: npm ci | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- uses: php-actions/composer@v6 | ||
with: | ||
php_version: "8.2" | ||
php_extensions: pcntl | ||
version: 2.x | ||
|
||
- name: Run fixers | ||
run: composer fix | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
id: auto_commit_action | ||
with: | ||
commit_message: Dusting | ||
commit_user_name: GitHub Action | ||
commit_user_email: [email protected] | ||
|
||
- name: Ignore Duster commit in git blame | ||
if: steps.auto_commit_action.outputs.changes_detected == 'true' | ||
run: echo ${{ steps.auto_commit_action.outputs.commit_hash }} >> .git-blame-ignore-revs | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Ignore Dusting commit in git blame | ||
commit_user_name: GitHub Action | ||
commit_user_email: [email protected] | ||
|
||
duster-lint: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
- run: npm ci | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- uses: php-actions/composer@v6 | ||
with: | ||
php_version: "8.2" | ||
php_extensions: pcntl | ||
version: 2.x | ||
|
||
- name: Run linters & static analysis | ||
run: composer lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: tests | ||
|
||
on: | ||
pull_request: | ||
branches: [development, dev, acceptance, staging, main, master] | ||
|
||
jobs: | ||
skip-duplicates: | ||
continue-on-error: true # Uncomment once integration is finished | ||
runs-on: ubuntu-latest | ||
|
||
# Map a step output to a job output | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
|
||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v5 | ||
with: | ||
# All of these options are optional, so you can remove them if you are happy with the defaults | ||
cancel_others: "true" | ||
concurrent_skipping: "same_content" | ||
skip_after_successful_duplicate: "true" | ||
paths_ignore: '["**/README.md", "**/docs/**"]' | ||
|
||
laravel-tests: | ||
needs: skip-duplicates | ||
if: needs.skip-duplicates.outputs.should_skip != 'true' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- uses: php-actions/composer@v6 | ||
with: | ||
php_version: "8.2" | ||
php_extensions: pcntl | ||
version: 2.x | ||
|
||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
|
||
- name: Generate key | ||
run: php artisan key:generate | ||
|
||
# - name: Directory Permissions | ||
# run: chmod -R 777 storage bootstrap/cache | ||
|
||
- name: Create Database | ||
run: | | ||
mkdir -p database | ||
touch database/database.sqlite | ||
- name: Execute tests | ||
env: | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: database/database.sqlite | ||
run: php artisan test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
// @codeCoverageIgnoreStart | ||
|
||
// Prefer adding customizations to pint.json unless adding custom fixers | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Finder; | ||
|
||
$finder = Finder::create() | ||
->in([ | ||
__DIR__ . '/app', | ||
__DIR__ . '/config', | ||
__DIR__ . '/database', | ||
__DIR__ . '/resources', | ||
__DIR__ . '/routes', | ||
__DIR__ . '/tests', | ||
]) | ||
->name('*.php') | ||
->notName('*.blade.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true); | ||
|
||
return (new Config) | ||
->setFinder($finder) | ||
->setRules([]) | ||
->setRiskyAllowed(true) | ||
->setUsingCache(false); | ||
|
||
// @codeCoverageIgnoreEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Gedachtegoed"> | ||
<description>Gedachtegoed PHP CS rules for Laravel</description> | ||
|
||
<file>app</file> | ||
<file>config</file> | ||
<file>database</file> | ||
<file>public</file> | ||
<file>resources</file> | ||
<file>routes</file> | ||
<file>tests</file> | ||
|
||
<description>Gedachtegoed PHP CS rules for Laravel</description> | ||
|
||
<!-- Ignore normal Laravel files and folders --> | ||
<exclude-pattern>*/cache/*</exclude-pattern> | ||
<exclude-pattern>*/*.js</exclude-pattern> | ||
<exclude-pattern>*/*.css</exclude-pattern> | ||
<exclude-pattern>*/*.xml</exclude-pattern> | ||
<exclude-pattern>*/*.blade.php</exclude-pattern> | ||
<exclude-pattern>*/autoload.php</exclude-pattern> | ||
<exclude-pattern>*/storage/*</exclude-pattern> | ||
<exclude-pattern>*/docs/*</exclude-pattern> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
<exclude-pattern>*/migrations/*</exclude-pattern> | ||
|
||
<!-- Hard-code command-line parameters --> | ||
<arg name="colors"/> | ||
<arg value="p"/> | ||
|
||
<!-- PSR1 2.3 Side Effects --> | ||
<rule ref="PSR1.Files.SideEffects"> | ||
<!-- Disable side effects for index file --> | ||
<exclude-pattern>/public/index.php</exclude-pattern> | ||
<!-- Disable side effects for tests (Pest) --> | ||
<exclude-pattern>/tests</exclude-pattern> | ||
</rule> | ||
|
||
<!-- PSR1 3 Namespaces and classes MUST follow PSR-0. --> | ||
<rule ref="PSR1.Classes.ClassDeclaration"/> | ||
|
||
<!-- Disable missing namespace rule for tests and database files --> | ||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace"> | ||
<exclude-pattern>*/database/*</exclude-pattern> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
</rule> | ||
|
||
<!-- PSR1 3 Class names MUST be declared in StudlyCaps. --> | ||
<rule ref="Squiz.Classes.ValidClassName"/> | ||
|
||
<!-- PSR1 4.1 Class constants MUST be declared in all upper case with underscore separators. --> | ||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/> | ||
|
||
<!-- PSR1 4.3 Method names MUST be declared in camelCase(). --> | ||
<rule ref="PSR1.Methods.CamelCapsMethodName"/> | ||
|
||
<!-- Disable camel caps rule for tests --> | ||
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
</rule> | ||
|
||
<!-- No compact() and no 'dumps' --> | ||
<rule ref="Generic.PHP.ForbiddenFunctions"> | ||
<properties> | ||
<property name="forbiddenFunctions" type="array"> | ||
<element key="compact" value="null"/> | ||
<element key="dd" value="null"/> | ||
<element key="dump" value="null"/> | ||
<element key="var_dump" value="null"/> | ||
<element key="ray" value="null"/> | ||
<element key="env" value="null"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="Generic.PHP.ForbiddenFunctions"> | ||
<exclude-pattern>/config/*</exclude-pattern> | ||
<properties> | ||
<property name="forbiddenFunctions" type="array"> | ||
<element key="env" value="null"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Class name should match the file name --> | ||
<rule ref="Squiz.Classes.ClassFileName"/> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"plugins": [ | ||
"@shufo/prettier-plugin-blade" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.blade.php" | ||
], | ||
"options": { | ||
"parser": "blade", | ||
"tabWidth": 4 | ||
} | ||
} | ||
], | ||
|
||
"htmlWhitespaceSensitivity": "css", | ||
"sortTailwindcssClasses": true, | ||
"singleAttributePerLine": true, | ||
"bracketSameLine": false, | ||
"printWidth": 600, | ||
"tabWidth": 4 | ||
} |
Oops, something went wrong.