From 699bc41ea6c76dcd5d845cf260ba1212707db4c9 Mon Sep 17 00:00:00 2001 From: Sander Muller Date: Wed, 2 Sep 2026 18:02:11 +0200 Subject: [PATCH] Group the atomic-save e2e entry with the other result-cache ones It went in as the first entry of the matrix, which is the position every branch reaches for. An entry there has to be reconciled on every merge of 2.2.x into 2.3.x, and 2.3.x is where the single-pass work will be adding its own scenarios. Moved next to result-cache-10, where its siblings are. Pure move: the matrix holds the same 70 scripts before and after, compared as a set, and the scenario still passes. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/e2e-tests.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index dfaa99adb87..37b37a1fc8a 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -34,22 +34,6 @@ jobs: fail-fast: false matrix: include: - - script: | - cd e2e/result-cache-atomic-save - ../../bin/phpstan - INODE=$(ls -i tmp/resultCache.php | awk '{print $1}') - ../../bin/phpstan - # The cache is written next to its final path and renamed into place, so saving it - # again replaces the file rather than truncating and rewriting the one the next run - # reads. That is what keeps a run killed mid-save from leaving a partial cache behind. - REPLACED=$([ "$INODE" != "$(ls -i tmp/resultCache.php | awk '{print $1}')" ] && echo replaced || echo 'written in place') - ../bashunit -a equals 'replaced' "$REPLACED" - # A completed save leaves nothing next to the cache file. - LEFTOVERS=$(ls tmp/ | grep -c '\.tmp$' || true) - ../bashunit -a equals '0' "$LEFTOVERS" - OUTPUT=$(../../bin/phpstan -vvv 2>&1) - echo "$OUTPUT" - ../bashunit -a contains 'Result cache restored. 0 files will be reanalysed.' "$OUTPUT" - script: | cd e2e/result-cache-1 echo -n > phpstan-baseline.neon @@ -140,6 +124,22 @@ jobs: mv src/Foo.php.orig src/Foo.php echo -n > phpstan-baseline.neon ../../bin/phpstan -vvv + - script: | + cd e2e/result-cache-atomic-save + ../../bin/phpstan + INODE=$(ls -i tmp/resultCache.php | awk '{print $1}') + ../../bin/phpstan + # The cache is written next to its final path and renamed into place, so saving it + # again replaces the file rather than truncating and rewriting the one the next run + # reads. That is what keeps a run killed mid-save from leaving a partial cache behind. + REPLACED=$([ "$INODE" != "$(ls -i tmp/resultCache.php | awk '{print $1}')" ] && echo replaced || echo 'written in place') + ../bashunit -a equals 'replaced' "$REPLACED" + # A completed save leaves nothing next to the cache file. + LEFTOVERS=$(ls tmp/ | grep -c '\.tmp$' || true) + ../bashunit -a equals '0' "$LEFTOVERS" + OUTPUT=$(../../bin/phpstan -vvv 2>&1) + echo "$OUTPUT" + ../bashunit -a contains 'Result cache restored. 0 files will be reanalysed.' "$OUTPUT" - script: | cd e2e/bug-14514 composer install