Skip to content

Commit

Permalink
PG-27
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed Nov 30, 2023
1 parent 414e2f7 commit da47280
Show file tree
Hide file tree
Showing 47 changed files with 1,656 additions and 616 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Playground tests
name: 'Tests: Playground'

on:
push:
Expand Down Expand Up @@ -26,16 +26,17 @@ jobs:
with:
php_extensions: xdebug
coverage_clover: clover.xml
coverage_text: true
- name: Make code coverage badge
uses: timkrase/[email protected]
with:
coverage_badge_path: output/coverage.svg
push_badge: false
- name: Git push to image-data branch
- name: Git push to testing/develop branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
publish_branch: testing/develop
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ node_modules
tmp*
temp*
vendor
*.derp
################################################################################
# Test and Docs ignores
################################################################################
output
coverage
phpunit.xml
phpstan.neon
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Playground

![Test Coverage](https://raw.githubusercontent.com/gammamatrix/playground/image-data/coverage.svg)
![Playground CI Workflow](https://github.com/gammamatrix/playground/actions/workflows/ci.yml/badge.svg?)
[![Playground CI Workflow](https://github.com/gammamatrix/playground/actions/workflows/ci.yml/badge.svg?branch=develop)](https://raw.githubusercontent.com/gammamatrix/playground/testing/develop/testdox.txt)
[![Test Coverage](https://raw.githubusercontent.com/gammamatrix/playground/testing/develop/coverage.svg)](tests)

This is the base package for Playground.

Expand Down
6 changes: 6 additions & 0 deletions config/playground.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@
*/
'verify' => (string) env('PLAYGROUND_AUTH_VERIFY', 'privileges'),
// 'verify' => (string) env('PLAYGROUND_AUTH_VERIFY', 'roles'),
'token' => [
'name' => 'app',
],
'hasPrivilege' => (bool) env('PLAYGROUND_AUTH_HAS_PRIVILEGE', false),
'userPrivileges' => (bool) env('PLAYGROUND_AUTH_USER_PRIVILEGES', false),
'hasRole' => (bool) env('PLAYGROUND_AUTH_HAS_ROLE', false),
'userRole' => (bool) env('PLAYGROUND_AUTH_USER_ROLE', false),
'userRoles' => (bool) env('PLAYGROUND_AUTH_USER_ROLES', false),
],
'date' => [
'sql' => (bool) env('PLAYGROUND_DATE_MYSQL', 'Y-m-d H:i:s'),
],
'load' => [
'routes' => (bool) env('PLAYGROUND_LOAD_ROUTES', false),
'views' => (bool) env('PLAYGROUND_LOAD_VIEWS', false),
Expand Down
76 changes: 76 additions & 0 deletions phpunit.xml.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<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"
stopOnSkipped="false"
backupGlobals="false"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
cacheResult="false"
failOnRisky="true"
failOnWarning="true"
processIsolation="false"
stopOnError="true"
stopOnFailure="true"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
testdox="true">
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<coverage
includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<report>
<clover outputFile="tests/logs/clover.xml"/>
<cobertura outputFile="tests/logs/cobertura.xml"/>
<crap4j outputFile="tests/logs/crap4j.xml" threshold="50"/>
<html outputDirectory="tests/logs/html" lowUpperBound="50" highLowerBound="90"/>
<php outputFile="tests/logs/coverage.php"/>
<text outputFile="tests/logs/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<xml outputDirectory="tests/logs/xml"/>
</report>
</coverage>
<logging>
<junit outputFile="tests/logs/junit.xml"/>
<teamcity outputFile="tests/logs/teamcity.txt"/>
<testdoxHtml outputFile="tests/logs/testdox.html"/>
<testdoxText outputFile="tests/logs/testdox.txt"/>
</logging>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
<php>
<env name="APP_DEBUG" value="false"/>
<env name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="base64:lNTGdmOOxP5uNUVuCj9FB//Ssn8JmRXBdtPEE4/QReE="/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="LOG_CHANNEL" value="stderr"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="TEST_DB_MIGRATIONS" value="true"/>
<env name="MAIL_MAILER" value="log"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<ini name="memory_limit" value="512M" />
</php>
</phpunit>
92 changes: 46 additions & 46 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<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"
stopOnSkipped="false"
backupGlobals="false"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
cacheResult="false"
failOnRisky="true"
failOnWarning="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
testdox="true"
>
<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"
stopOnSkipped="false"
backupGlobals="false"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
cacheResult="false"
failOnRisky="true"
failOnWarning="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
testdox="true">
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
Expand All @@ -31,27 +31,27 @@
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<!-- <coverage
includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<report>
<clover outputFile="tests/logs/clover.xml"/>
<cobertura outputFile="tests/logs/cobertura.xml"/>
<crap4j outputFile="tests/logs/crap4j.xml" threshold="50"/>
<html outputDirectory="tests/logs/html" lowUpperBound="50" highLowerBound="90"/>
<php outputFile="tests/logs/coverage.php"/>
<text outputFile="tests/logs/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<xml outputDirectory="tests/logs/xml"/>
</report>
</coverage> -->
<logging>
<junit outputFile="tests/logs/junit.xml"/>
<teamcity outputFile="tests/logs/teamcity.txt"/>
<testdoxHtml outputFile="tests/logs/testdox.html"/>
<testdoxText outputFile="tests/logs/testdox.txt"/>
</logging>
<coverage
includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<report>
<clover outputFile="output/clover.xml"/>
<cobertura outputFile="output/cobertura.xml"/>
<crap4j outputFile="output/crap4j.xml" threshold="50"/>
<!-- <html outputDirectory="output/html" lowUpperBound="50" highLowerBound="90"/> -->
<php outputFile="output/coverage.php"/>
<text outputFile="output/coverage.txt" showUncoveredFiles="false" showOnlySummary="true"/>
<!-- <xml outputDirectory="output/xml"/> -->
</report>
</coverage>
<logging>
<junit outputFile="output/junit.xml"/>
<teamcity outputFile="output/teamcity.txt"/>
<testdoxHtml outputFile="output/testdox.html"/>
<testdoxText outputFile="output/testdox.txt"/>
</logging>
<source>
<include>
<directory suffix=".php">src</directory>
Expand All @@ -63,9 +63,9 @@
<env name="APP_KEY" value="base64:lNTGdmOOxP5uNUVuCj9FB//Ssn8JmRXBdtPEE4/QReE="/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="LOG_CHANNEL" value="stderr"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="TEST_DB_MIGRATIONS" value="true"/>
<env name="MAIL_MAILER" value="log"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
Expand Down
39 changes: 0 additions & 39 deletions resources/views/components/modal.blade.php

This file was deleted.

58 changes: 0 additions & 58 deletions resources/views/components/snippets.blade.php

This file was deleted.

22 changes: 11 additions & 11 deletions resources/views/components/table/data-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@
}
}
// dump([
// '__METHOD__' => __METHOD__,
// '__FILE__' => __FILE__,
// '__LINE__' => __LINE__,
// '$value' => $value,
// '$column' => $column,
// '$columnMeta' => $columnMeta,
// '$hasLink' => $hasLink,
// '$link' => $link,
// '$record' => $record,
// '$datum' => $datum,
// '$fkModel' => $fkModel ? $fkModel->toArray() : $fkModel,
// '__METHOD__' => __METHOD__,
// '__FILE__' => __FILE__,
// '__LINE__' => __LINE__,
// '$value' => $value,
// '$column' => $column,
// '$columnMeta' => $columnMeta,
// '$hasLink' => $hasLink,
// '$link' => $link,
// '$record' => $record,
// '$datum' => $datum,
// '$fkModel' => $fkModel ? $fkModel->toArray() : $fkModel,
// ]);
} elseif ($columnMeta['showSpec']) {
// Get the label of the type.
Expand Down
Loading

0 comments on commit da47280

Please sign in to comment.