Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
59 changes: 59 additions & 0 deletions .github/workflows/deptrac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: deptrac

on:
push:
paths-ignore:
- 'src/*/doc/**'
- 'src/**/*.md'
pull_request:
paths-ignore:
- 'src/*/doc/**'
- 'src/**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
deptrac:
name: deptrac
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ '8.4' ]
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Configure environment
run: |
echo COLUMNS=120 >> $GITHUB_ENV
echo COMPOSER_UP='composer update --no-progress --no-interaction --ansi --ignore-platform-req=ext-mongodb' >> $GITHUB_ENV

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache packages dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ hashFiles('src/**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-packages-${{ matrix.php-version }}

- name: Install root dependencies
uses: ramsey/composer-install@v3

- name: Build root packages
run: php .github/build-packages.php

- name: Run DEPTRAC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Run DEPTRAC
- name: Run deptrac/deptrac

run: $COMPOSER_UP && vendor/bin/deptrac
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.deptrac.cache
.doctor-rst.cache
.php-cs-fixer.cache
.phpunit.cache
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
],
"require-dev": {
"php": ">=8.2",
"deptrac/deptrac": "^4.2",
"php-cs-fixer/shim": "^3.75",
"phpstan/phpstan-strict-rules": "^2.0",
"symfony/filesystem": "^7.3|^8.0",
Expand Down
43 changes: 43 additions & 0 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
deptrac:
paths:
- ./src
exclude_files:
- '#.*test.*#'
- '#.*vendor.*#'
layers:
- name: Agent
collectors:
- type: classLike
value: Symfony\\AI\\Agent.*
- name: Chat
collectors:
- type: classLike
value: Symfony\\AI\\Chat.*
- name: Platform
collectors:
- type: classLike
value: Symfony\\AI\\Platform.*
- name: Store
collectors:
- type: classLike
value: Symfony\\AI\\Store.*
ruleset:
Agent:
- Platform
- Store
Chat:
- Agent
- Platform
Platform: ~
Store:
- Platform
# Baseline of known violations to be skipped for now
skip_violations:
Symfony\AI\Platform\Bridge\Anthropic\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\DeepSeek\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\Gemini\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\Mistral\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\OpenAi\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\Perplexity\SearchResultProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\Perplexity\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Symfony\AI\Platform\Bridge\VertexAi\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Loading