Skip to content

Commit daddaa3

Browse files
committed
Merge branch 'feature/ghactions-cache-busting' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 514d9f7 + c9829af commit daddaa3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
# @link https://github.com/marketplace/actions/install-composer-dependencies
3535
- name: Install Composer dependencies
3636
uses: "ramsey/composer-install@v2"
37+
with:
38+
# Bust the cache at least once a month - output format: YYYY-MM.
39+
custom-cache-suffix: $(date -u "+%Y-%m")
3740

3841
- name: Run PHPStan
3942
run: phpstan analyse --configuration=phpstan.neon

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,17 @@ jobs:
117117
- name: Install Composer dependencies - normal
118118
if: ${{ matrix.php < '8.0' }}
119119
uses: "ramsey/composer-install@v2"
120+
with:
121+
# Bust the cache at least once a month - output format: YYYY-MM.
122+
custom-cache-suffix: $(date -u "+%Y-%m")
120123

121124
# For PHP 8.0+, we need to install with ignore platform reqs as PHPUnit 7 is still used.
122125
- name: Install Composer dependencies - with ignore platform
123126
if: ${{ matrix.php >= '8.0' }}
124127
uses: "ramsey/composer-install@v2"
125128
with:
126129
composer-options: --ignore-platform-reqs
130+
custom-cache-suffix: $(date -u "+%Y-%m")
127131

128132
# Note: The code style check is run multiple times against every PHP version
129133
# as it also acts as an integration test.

0 commit comments

Comments
 (0)