-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #36 from tattersoftware/tools
Update toolkit (Deptrac)
- Loading branch information
Showing
8 changed files
with
349 additions
and
81 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,83 @@ | ||
# When a PR is opened or a push is made, perform an | ||
# architectural inspection on the code using Deptrac. | ||
name: Deptrac | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'develop' | ||
paths: | ||
- 'src/**' | ||
- 'tests/**' | ||
- 'composer.**' | ||
- 'depfile.yaml' | ||
- '.github/workflows/inspect.yml' | ||
push: | ||
branches: | ||
- 'develop' | ||
paths: | ||
- 'src/**' | ||
- 'tests/**' | ||
- 'composer.**' | ||
- 'depfile.yaml' | ||
- '.github/workflows/inspect.yml' | ||
|
||
jobs: | ||
build: | ||
name: PHP ${{ matrix.php-versions }} Architectural Inspection | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['7.4', '8.0'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: composer, pecl, phive, phpunit | ||
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3 | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Create composer cache directory | ||
run: mkdir -p ${{ steps.composer-cache.outputs.dir }} | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Create Deptrac cache directory | ||
run: mkdir -p build/ | ||
|
||
- name: Cache Deptrac results | ||
uses: actions/cache@v2 | ||
with: | ||
path: build | ||
key: ${{ runner.os }}-deptrac-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-deptrac- | ||
|
||
- name: Install dependencies (limited) | ||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} | ||
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader | ||
|
||
- name: Install dependencies (authenticated) | ||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} | ||
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader | ||
env: | ||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | ||
|
||
- name: Run architectural inspection | ||
run: | | ||
sudo phive --no-progress install --global qossmic/deptrac --trust-gpg-keys B8F640134AB1782E | ||
deptrac analyze --cache-file=build/deptrac.cache |
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,33 @@ | ||
<?php | ||
|
||
use Nexus\CsConfig\Factory; | ||
use PhpCsFixer\Finder; | ||
use Tatter\Tools\Standard; | ||
|
||
$finder = Finder::create() | ||
->files() | ||
->in(__DIR__) | ||
->exclude('build') | ||
->append([__FILE__]); | ||
|
||
// Remove overrides for incremental changes | ||
$overrides = [ | ||
'array_indentation' => false, | ||
'braces' => false, | ||
'indentation_type' => false, | ||
]; | ||
|
||
$options = [ | ||
'finder' => $finder, | ||
'cacheFile' => 'build/.php-cs-fixer.cache', | ||
]; | ||
|
||
/* Reenable after incremental changes are applied | ||
return Factory::create(new Standard(), $overrides, $options)->forLibrary( | ||
'Library', | ||
'Tatter Software', | ||
'', | ||
2021 | ||
); | ||
*/ | ||
return Factory::create(new Standard(), $overrides, $options)->forProjects(); |
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 |
---|---|---|
@@ -1,75 +1,76 @@ | ||
{ | ||
"name": "tatter/workflows", | ||
"type": "library", | ||
"description": "Job task control through dynamic workflows, for CodeIgniter 4", | ||
"keywords": [ | ||
"codeigniter", | ||
"codeigniter4", | ||
"workflows", | ||
"actions", | ||
"jobs" | ||
], | ||
"homepage": "https://github.com/tattersoftware/codeigniter4-workflows", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Matthew Gatner", | ||
"email": "mgatner@tattersoftware.com", | ||
"homepage": "https://tattersoftware.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.3 || ^8.0", | ||
"codeigniter4/authentication-implementation": "1.0", | ||
"components/jquery": "^3.3", | ||
"fortawesome/font-awesome": "^5.8", | ||
"npm-asset/sortablejs": "^1.10", | ||
"tatter/alerts": "^2.0", | ||
"tatter/assets": "^2.0", | ||
"tatter/audits": "^1.0", | ||
"tatter/handlers": "^2.0", | ||
"tatter/users": "^1.0", | ||
"twbs/bootstrap": "^4.3" | ||
}, | ||
"require-dev": { | ||
"codeigniter4/codeigniter4": "dev-develop", | ||
"myth/auth": "dev-develop", | ||
"tatter/tools": "^1.8" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Tatter\\Workflows\\": "src" | ||
}, | ||
"exclude-from-classmap": [ | ||
"**/Database/Migrations/**" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\Support\\": "tests/_support" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/codeigniter4/CodeIgniter4" | ||
}, | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/lonnieezell/myth-auth" | ||
}, | ||
{ | ||
"type": "composer", | ||
"url": "https://asset-packagist.org" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"scripts": { | ||
"analyze": "phpstan analyze", | ||
"mutate": "infection --threads=2 --skip-initial-tests --coverage=build/phpunit", | ||
"style": "phpcbf --standard=./vendor/codeigniter4/codeigniter4-standard/CodeIgniter4 tests/ src/", | ||
"test": "phpunit" | ||
} | ||
"name": "tatter/workflows", | ||
"type": "library", | ||
"description": "Job task control through dynamic workflows, for CodeIgniter 4", | ||
"keywords": [ | ||
"codeigniter", | ||
"codeigniter4", | ||
"workflows", | ||
"actions", | ||
"jobs" | ||
], | ||
"homepage": "https://github.com/tattersoftware/codeigniter4-workflows", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Matthew Gatner", | ||
"email": "mgatner@tattersoftware.com", | ||
"homepage": "https://tattersoftware.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.3 || ^8.0", | ||
"codeigniter4/authentication-implementation": "1.0", | ||
"components/jquery": "^3.3", | ||
"fortawesome/font-awesome": "^5.8", | ||
"npm-asset/sortablejs": "^1.10", | ||
"tatter/alerts": "^2.0", | ||
"tatter/assets": "^2.0", | ||
"tatter/audits": "^1.0", | ||
"tatter/handlers": "^2.0", | ||
"tatter/users": "^1.0", | ||
"twbs/bootstrap": "^4.3" | ||
}, | ||
"require-dev": { | ||
"codeigniter4/codeigniter4": "dev-develop", | ||
"myth/auth": "dev-develop", | ||
"tatter/tools": "^1.10" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Tatter\\Workflows\\": "src" | ||
}, | ||
"exclude-from-classmap": [ | ||
"**/Database/Migrations/**" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\Support\\": "tests/_support" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/codeigniter4/CodeIgniter4" | ||
}, | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/lonnieezell/myth-auth" | ||
}, | ||
{ | ||
"type": "composer", | ||
"url": "https://asset-packagist.org" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"scripts": { | ||
"analyze": "phpstan analyze", | ||
"inspect": "deptrac analyze --cache-file=build/deptrac.cache", | ||
"mutate": "infection --threads=2 --skip-initial-tests --coverage=build/phpunit", | ||
"style": "php-cs-fixer fix --verbose --ansi", | ||
"test": "phpunit" | ||
} | ||
} |
Oops, something went wrong.