Skip to content

Commit 0b30203

Browse files
committed
Add vendor cleanup steps between PHPStan runs
1 parent a85570a commit 0b30203

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/code-quality.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ jobs:
7474
7575
echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} '(cd src/{} && $COMPOSER_UP && $PHPSTAN)'"
7676
77+
- name: Cleanup package vendor directories
78+
run: find src/ -maxdepth 2 -type d -name vendor -exec rm -rf {} + 2>/dev/null || true
79+
7780
- name: Run PHPStan on store bridges
7881
run: |
7982
source .github/workflows/.utils.sh
@@ -82,6 +85,9 @@ jobs:
8285
echo "Bridges: $BRIDGES"
8386
echo "$BRIDGES" | xargs -n1 | parallel -j +3 "_run_task {} '(cd src/store/src/Bridge/{} && $COMPOSER_UP && $PHPSTAN)'"
8487
88+
- name: Cleanup store bridge vendor directories
89+
run: find src/store/src/Bridge/ -maxdepth 2 -type d -name vendor -exec rm -rf {} + 2>/dev/null || true
90+
8591
- name: Run PHPStan on tool bridges
8692
run: |
8793
source .github/workflows/.utils.sh
@@ -90,15 +96,18 @@ jobs:
9096
echo "Bridges: $BRIDGES"
9197
echo "$BRIDGES" | xargs -n1 | parallel -j +3 "_run_task {} '(cd src/agent/src/Bridge/{} && $COMPOSER_UP && $PHPSTAN)'"
9298
99+
- name: Cleanup tool bridge vendor directories
100+
run: find src/agent/src/Bridge/ -maxdepth 2 -type d -name vendor -exec rm -rf {} + 2>/dev/null || true
101+
93102
- name: Run PHPStan on platform bridges
94103
run: |
95-
# Platform bridges run SEQUENTIALLY at the end because they depend on symfony/ai-platform
104+
# Platform bridges run SEQUENTIALLY because they depend on symfony/ai-platform
96105
# which is in the same directory tree. Running in parallel causes recursive vendor copies
97106
# when bridge A's vendor/symfony/ai-platform includes bridge B's vendor (if B finished first).
98107
source .github/workflows/.utils.sh
99108
100109
BRIDGES=$(find src/platform/src/Bridge/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort | tr '\n' ' ')
101110
echo "Bridges: $BRIDGES"
102111
for BRIDGE in $BRIDGES; do
103-
_run_task "$BRIDGE" "(cd src/platform/src/Bridge/$BRIDGE && $COMPOSER_UP && $PHPSTAN)"
112+
_run_task "$BRIDGE" "(cd src/platform/src/Bridge/$BRIDGE && $COMPOSER_UP && $PHPSTAN && rm -rf vendor)"
104113
done

0 commit comments

Comments
 (0)