Skip to content

Commit

Permalink
Merge pull request #477 from patchlevel/add-deptrac
Browse files Browse the repository at this point in the history
Add deptrac
  • Loading branch information
DanielBadura authored Mar 13, 2024
2 parents bbe507a + 272a303 commit a15c78b
Show file tree
Hide file tree
Showing 8 changed files with 1,376 additions and 319 deletions.
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

0 comments on commit a15c78b

Please sign in to comment.