Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG-27 #7

Merged
merged 7 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 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 All @@ -19,23 +19,30 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
# - uses: php-actions/composer@v6
- name: Run php-actions/composer@v6
uses: php-actions/composer@v6
with:
php_version: "8.2"
php_extensions: intl
version: 2.x
- uses: php-actions/phpunit@v3
env:
XDEBUG_MODE: coverage
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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
"require": {
"php": "^8.1",
"ext-intl": "*",
"ezyang/htmlpurifier": "^4.16",
"illuminate/auth": "^10.0",
"illuminate/console": "^10.0",
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' => (string) 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.

Loading