Skip to content

Commit 4e02ca1

Browse files
committed
fix composer install on benchmark comparison
1 parent 09dfc68 commit 4e02ca1

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/benchmark.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
# Step 3: Install dependencies for PR branch
4343
- name: Install Composer dependencies
4444
run: |
45+
# Remove dependency artifacts that can leak across branch switches in CI
46+
git clean -fd -- composer.lock vendor
4547
composer install --prefer-dist --no-progress
4648
4749
# Step 4: Run benchmarks on PR branch
@@ -65,6 +67,8 @@ jobs:
6567
# Step 6: Install dependencies for base branch
6668
- name: Install Composer dependencies (base)
6769
run: |
70+
# Ensure install uses only files from the checked out base branch
71+
git clean -fd -- composer.lock vendor
6872
composer install --prefer-dist --no-progress
6973
7074
# Step 7: Run benchmarks on base branch
@@ -83,6 +87,13 @@ jobs:
8387
env:
8488
HEAD_REF: ${{ github.head_ref }}
8589

90+
# Step 8.1: Reinstall dependencies for PR branch
91+
- name: Install Composer dependencies (PR, comparison)
92+
run: |
93+
# Prevent base branch dependency artifacts from affecting PR comparison run
94+
git clean -fd -- composer.lock vendor
95+
composer install --prefer-dist --no-progress
96+
8697
# Step 9: Compare benchmarks
8798
- name: Compare benchmarks with baseline
8899
id: compare

0 commit comments

Comments
 (0)