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

Add deptrac #477

Merged
merged 7 commits into from
Mar 13, 2024
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
49 changes: 49 additions & 0 deletions .github/workflows/deptrac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Static Analysis by Deptrac"

on:
pull_request:
push:
branches:
- "[0-9]+.[0-9]+.x"
- "renovate/*"

jobs:
static-analysis-deptrac:
name: "Static Analysis by Deptrac"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.3"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/[email protected]
with:
dependency-versions: ${{ matrix.dependencies }}

- uses: ramsey/[email protected]
with:
dependency-versions: ${{ matrix.dependencies }}
working-directory: 'tools'

- name: "deptrac"
run: "cd tools && ./vendor/bin/deptrac -c ../deptrac.yaml"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ phpstan.neon
infection.log
.phpbench/
infection.html
*.sqlite3
*.sqlite3
.deptrac.cache
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ phpunit-unit: vendor ## run phpu
infection: vendor ## run infection
vendor/bin/infection

.PHONY: deptrac
deptrac: tools/vendor ## run deptrac
cd tools && ./vendor/bin/deptrac -c ../deptrac.yaml

.PHONY: deptrac-baseline
deptrac-baseline: tools/vendor ## run deptrac and update baseline
cd tools && ./vendor/bin/deptrac -c ../deptrac.yaml --formatter=baseline --output=../deptrac-baseline.yaml

.PHONY: static
static: psalm phpstan phpcs-check ## run static analyser

Expand Down
Loading
Loading