|
46 | 46 | - name: Ensure that composer.json is valid |
47 | 47 | run: ./tools/composer validate --no-ansi --strict composer.json |
48 | 48 |
|
| 49 | + - name: Get Composer cache directory |
| 50 | + id: composer-cache |
| 51 | + shell: bash |
| 52 | + run: | |
| 53 | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" |
| 54 | +
|
| 55 | + - name: Cache Composer cache directory |
| 56 | + uses: actions/cache@v4 |
| 57 | + with: |
| 58 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 59 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 60 | + restore-keys: ${{ runner.os }}-composer- |
| 61 | + |
49 | 62 | - name: Ensure that dependencies can be installed |
50 | 63 | run: ./tools/composer install --no-ansi --dry-run |
51 | 64 |
|
@@ -112,6 +125,19 @@ jobs: |
112 | 125 | coverage: none |
113 | 126 | tools: none |
114 | 127 |
|
| 128 | + - name: Get Composer cache directory |
| 129 | + id: composer-cache |
| 130 | + shell: bash |
| 131 | + run: | |
| 132 | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" |
| 133 | +
|
| 134 | + - name: Cache Composer cache directory |
| 135 | + uses: actions/cache@v4 |
| 136 | + with: |
| 137 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 138 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 139 | + restore-keys: ${{ runner.os }}-composer- |
| 140 | + |
115 | 141 | - name: Install dependencies with Composer |
116 | 142 | run: ./tools/composer install --no-interaction --no-ansi --no-progress |
117 | 143 |
|
@@ -170,6 +196,19 @@ jobs: |
170 | 196 | ini-values: ${{ env.PHP_INI_VALUES }} |
171 | 197 | tools: none |
172 | 198 |
|
| 199 | + - name: Get Composer cache directory |
| 200 | + id: composer-cache |
| 201 | + shell: bash |
| 202 | + run: | |
| 203 | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" |
| 204 | +
|
| 205 | + - name: Cache Composer cache directory |
| 206 | + uses: actions/cache@v4 |
| 207 | + with: |
| 208 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 209 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 210 | + restore-keys: ${{ runner.os }}-composer- |
| 211 | + |
173 | 212 | - name: Install dependencies with Composer |
174 | 213 | run: php ./tools/composer install --no-ansi --no-interaction --no-progress |
175 | 214 |
|
@@ -228,6 +267,19 @@ jobs: |
228 | 267 | ini-values: ${{ env.PHP_INI_VALUES }} |
229 | 268 | tools: none |
230 | 269 |
|
| 270 | + - name: Get Composer cache directory |
| 271 | + id: composer-cache |
| 272 | + shell: bash |
| 273 | + run: | |
| 274 | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" |
| 275 | +
|
| 276 | + - name: Cache Composer cache directory |
| 277 | + uses: actions/cache@v4 |
| 278 | + with: |
| 279 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 280 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 281 | + restore-keys: ${{ runner.os }}-composer- |
| 282 | + |
231 | 283 | - name: Install dependencies with Composer |
232 | 284 | run: php ./tools/composer install --no-ansi --no-interaction --no-progress |
233 | 285 |
|
@@ -267,6 +319,19 @@ jobs: |
267 | 319 | ini-values: zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On |
268 | 320 | tools: none |
269 | 321 |
|
| 322 | + - name: Get Composer cache directory |
| 323 | + id: composer-cache |
| 324 | + shell: bash |
| 325 | + run: | |
| 326 | + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" |
| 327 | +
|
| 328 | + - name: Cache Composer cache directory |
| 329 | + uses: actions/cache@v4 |
| 330 | + with: |
| 331 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 332 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 333 | + restore-keys: ${{ runner.os }}-composer- |
| 334 | + |
270 | 335 | - name: Install dependencies with Composer |
271 | 336 | run: ./tools/composer install --no-ansi --no-interaction --no-progress |
272 | 337 |
|
|
0 commit comments