Skip to content

Commit

Permalink
retool
Browse files Browse the repository at this point in the history
  • Loading branch information
battis committed Mar 21, 2023
1 parent 9ecfbd1 commit c4fe942
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 69 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ jobs:
env:
XDEBUG_MODE: coverage
with:
version: 9
configuration: phpunit.xml
php_extensions: xdebug
args: tests --coverage-clover ./coverage.xml

- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV }}
files: ./coverage.xml
files: ./coverage/clover.xml
verbose: true
26 changes: 5 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
# Dependencies
/vendor/

# PHP development
/phpdoc/
.DS_Store
/.cache/
/coverage/
*.cache
/db.sqlite
/external/
/.nova/*
!/.nova/Artwork
!/.nova/Configuration.json

# Runtime
/logs/*
/var/*
!README.md

# Environment
.env
.env.*
!.env.example
/docs/
/tools/
/vendor/
9 changes: 9 additions & 0 deletions .nova/Tasks/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"actions" : {
"run" : {
"enabled" : true,
"script" : "composer run-script docs"
}
},
"openLogOnRun" : "start"
}
9 changes: 9 additions & 0 deletions .nova/Tasks/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"actions" : {
"run" : {
"enabled" : true,
"script" : "composer run-script test"
}
},
"openLogOnRun" : "start"
}
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@battis/prettier-config");
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"battis/phpunit-sessions": "^0.1",
"ext-simplexml": "*",
"php-di/php-di": "^6.4",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.0"
"phpspec/prophecy-phpunit": "^2.0"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -34,5 +33,9 @@
},
"config": {
"sort-packages": true
},
"scripts": {
"test": "XDEBUG_MODE=coverage ./tools/phpunit --coverage-text --coverage-html=coverage",
"docs": "./tools/phpdocumentor -d src -t docs"
}
}
124 changes: 108 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions phive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpunit" version="^10.0.16" installed="10.0.16" location="./tools/phpunit" copy="false"/>
<phar name="psalm" version="^5.8.0" installed="5.8.0" location="./tools/psalm" copy="false"/>
<phar name="php-cs-fixer" version="^3.15.1" installed="3.15.1" location="./tools/php-cs-fixer" copy="false"/>
<phar name="phpdocumentor" version="^3.3.1" installed="3.3.1" location="./tools/phpdocumentor" copy="false"/>
</phive>
35 changes: 19 additions & 16 deletions phpdoc.dist.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpdoc>
<parser>
<default-package-name>Battis\UserSession</default-package-name>
<target>var/phpdoc</target>
</parser>
<transformer>
<target>doc/api</target>
</transformer>
<files>
<directory>src</directory>
</files>
<transformations>
<template name="clean"/>
</transformations>
</phpdoc>
<?xml version="1.0" encoding="UTF-8" ?>
<phpdocumentor
configVersion="3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://www.phpdoc.org"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/phpDocumentor/phpDocumentor/master/data/xsd/phpdoc.xsd"
>
<paths>
<output>docs</output>
<cache>.cache/phpdoc</cache>
</paths>
<version number="latest">
<api>
<source dsn=".">
<path>src</path>
</source>
</api>
</version>
</phpdocumentor>
20 changes: 10 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".cache/phpunit" displayDetailsOnTestsThatTriggerWarnings="true" displayDetailsOnTestsThatTriggerNotices="true">
<testsuites>
<testsuite name="Battis\UserSession">
<testsuite name="Battis\DataUtilities">
<directory>tests</directory>
</testsuite>
</testsuites>
<extensions>
<extension class="Battis\PHPUnit\Sessions\Extension" />
</extensions>
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
<report>
<clover outputFile="coverage/clover.xml" />
</report>
</coverage>
</phpunit>
7 changes: 7 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<psalm>
<projectFiles>
<directory name="src" />
<directory name="tests" />
</projectFiles>
</psalm>

0 comments on commit c4fe942

Please sign in to comment.