Skip to content
New issue

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

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

Already on GitHub? # to your account

Add Deptrac dependency check to CI run #67

Merged
merged 1 commit into from
Jun 20, 2022
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
3 changes: 3 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
- name: Check Style
run: vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v --dry-run --stop-on-violation --using-cache=no -vvv

- name: Check Dependencies
run: vendor/bin/deptrac --formatter=github-actions --report-uncovered

- name: Run Phan
env:
PHAN_DISABLE_XDEBUG_WARN: 1
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ bash:
$(DC_RUN_PHP) bash
style:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --using-cache=no -vvv
deptrac:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/deptrac --formatter=table --report-uncovered --no-cache
split:
docker-compose -f docker/gitsplit/docker-compose.yaml --env-file ./.env up
FORCE:
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"symfony/polyfill-php80": "^1.16",
"symfony/proxy-manager-bridge": "^4.4|^5.3|^6.0",
"symfony/yaml": "^4.4|^5.3|^6.0",
"qossmic/deptrac-shim": "^0.22.1",
"vimeo/psalm": "^4.0"
},
"suggest": {
Expand Down
79 changes: 79 additions & 0 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

imports:
#- deptrac.baseline.yaml
deptrac:
analyser:
types:
- class
- class_superglobal
- use
- file
- function
- function_superglobal
paths:
- ./src
- ./tests
exclude_files:
- '#.*test.*#'
layers:
- name: API
collectors:
- type: className
regex: ^OpenTelemetry\\API\\*
- name: SDK
collectors:
- type: className
regex: ^OpenTelemetry\\SDK\\*
- name: Context
collectors:
- type: className
regex: ^OpenTelemetry\\Context\\*
- name: SemConv
collectors:
- type: className
regex: ^OpenTelemetry\\SemConv\\*
- name: Contrib
collectors:
- type: className
regex: ^OpenTelemetry\\Contrib\\*
- name: AwsContrib
collectors:
- type: className
regex: ^OpenTelemetry\\Aws\\*
- name: SymfonySdkBundleContrib
collectors:
- type: className
regex: ^OpenTelemetry\\Symfony\\OtelSdkBundle\\*
- name: PsrHttp
collectors:
- type: className
regex: ^Psr\\Http\\*
- name: PsrLog
collectors:
- type: className
regex: ^Psr\\Log\\*
- name: Symfony
collectors:
- type: className
regex: ^Symfony\\*
- name: HttpPlug
collectors:
- type: className
regex: ^Http\\*

ruleset:
API:
- Context
- SemConv
SDK:
- +API
- PsrHttp
- PsrLog
- HttpPlug
Contrib:
- +SDK
AwsContrib:
- +SDK
SymfonySdkBundleContrib:
- +Contrib
- Symfony