Skip to content

Commit 903c4eb

Browse files
committed
Bust composer cache and fix git checkout conflicts
- Update cache suffix to force reinstall with new php-code-coverage dependency - Stash local changes before checking out base branch to avoid conflicts - Save coverage.xml to /tmp before branch switch
1 parent ac67ebd commit 903c4eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/code-coverage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
dependency-versions: "highest"
5959
composer-options: "yoast/wp-test-utils --with-dependencies"
60-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
60+
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")-codecov-v2
6161

6262
- name: Install WordPress Test Suite
6363
shell: bash
@@ -173,6 +173,10 @@ jobs:
173173
- name: Checkout base branch for comparison
174174
if: github.event_name == 'pull_request'
175175
run: |
176+
# Save coverage.xml before switching branches
177+
cp coverage.xml /tmp/current-coverage.xml 2>/dev/null || true
178+
# Stash any local changes (like composer.lock)
179+
git stash --include-untracked || true
176180
git fetch origin ${{ github.base_ref }}
177181
git checkout origin/${{ github.base_ref }}
178182

0 commit comments

Comments
 (0)