-
-
Notifications
You must be signed in to change notification settings - Fork 8
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 #20 from tattersoftware/tools
Update dev toolkit
- Loading branch information
Showing
14 changed files
with
523 additions
and
207 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
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,29 @@ | ||
# When a PR is opened or a push is made, compare | ||
# code for backwards compatibility. | ||
name: RoaveBC | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
paths: | ||
- 'src/**' | ||
|
||
jobs: | ||
compare: | ||
name: Compare for Backwards Compatibility | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run comparison (limited) | ||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} | ||
uses: docker://nyholm/roave-bc-check-ga | ||
|
||
- name: Run comparison (authenticated) | ||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} | ||
uses: docker://nyholm/roave-bc-check-ga | ||
env: | ||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} |
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, grpc | ||
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(); |
Oops, something went wrong.