-
-
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.
- Loading branch information
1 parent
83be010
commit 0052cb4
Showing
22 changed files
with
4,110 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# define your env variables for the test env here | ||
KERNEL_CLASS='App\Kernel' | ||
APP_SECRET='$ecretf0rt3st' | ||
SYMFONY_DEPRECATIONS_HELPER=999999 | ||
PANTHER_APP_ENV=panther | ||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots |
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,9 @@ | ||
name: Build Docker Image | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag ${{ github.repository }}:$(date +%s) |
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,68 @@ | ||
name: Linting | ||
on: [push] | ||
jobs: | ||
php-cs-fixer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
- uses: actions/checkout@v2 | ||
- name: Copy .env.test.local | ||
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | ||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
- name: Run PHP CS Fixer | ||
run: vendor/bin/php-cs-fixer fix --dry-run | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
- uses: actions/checkout@v2 | ||
- name: Copy .env.test.local | ||
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | ||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
- name: Run phpstan | ||
run: vendor/bin/phpstan analyse | ||
|
||
psalm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
- uses: actions/checkout@v2 | ||
- name: Copy .env.test.local | ||
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | ||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
- name: Run Psalm | ||
run: vendor/bin/psalm --show-info=false |
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,42 @@ | ||
name: Tests | ||
on: [push] | ||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
- uses: actions/checkout@v2 | ||
- name: Copy .env.test.local | ||
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | ||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
- name: Execute tests (Unit and Feature tests) via PHPUnit | ||
run: php -dpcov.enabled=1 -dpcov.directory=. ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-html coverage --coverage-text --colors=always --coverage-cobertura=./cobertura-coverage.xml | ||
- name: Code Coverage Report | ||
uses: irongut/CodeCoverageSummary@v1.3.0 | ||
with: | ||
filename: ./cobertura-coverage.xml | ||
badge: true | ||
fail_below_min: true | ||
format: markdown | ||
hide_branch_rate: false | ||
hide_complexity: true | ||
indicators: true | ||
output: both | ||
thresholds: '75 90' | ||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
recreate: true | ||
path: code-coverage-results.md |
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,46 @@ | ||
<?php | ||
|
||
use PhpCsFixer\Config; | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/src'); | ||
|
||
return (new Config()) | ||
->setFinder($finder) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'@PHP70Migration' => true, | ||
'@PHP70Migration:risky' => true, | ||
'@PHP71Migration' => true, | ||
'@PHP71Migration:risky' => true, | ||
'@PhpCsFixer' => true, | ||
'@PhpCsFixer:risky' => true, | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'@DoctrineAnnotation' => true, | ||
'list_syntax' => ['syntax' => 'short'], | ||
'binary_operator_spaces' => [ | ||
'operators' => [ | ||
'=' => 'align', | ||
'=>' => 'align', | ||
'+=' => 'align', | ||
'-=' => 'align', | ||
'*=' => 'align', | ||
'%=' => 'align', | ||
'.=' => 'align', | ||
'^=' => 'align', | ||
], | ||
], | ||
'yoda_style' => false, | ||
'class_definition' => [ | ||
'single_line' => false, | ||
], | ||
'native_function_invocation' => true, | ||
'native_function_casing' => true, | ||
'native_constant_invocation' => true, | ||
'object_operator_without_whitespace' => false, | ||
'multiline_whitespace_before_semicolons' => [ | ||
'strategy' => 'no_multi_line', | ||
] | ||
]); |
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
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,19 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!ini_get('date.timezone')) { | ||
ini_set('date.timezone', 'UTC'); | ||
} | ||
|
||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { | ||
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); | ||
require PHPUNIT_COMPOSER_INSTALL; | ||
PHPUnit\TextUI\Command::main(); | ||
} else { | ||
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { | ||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; | ||
exit(1); | ||
} | ||
|
||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | ||
} |
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
Oops, something went wrong.