1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Optimize composer caching

Previously our composer package cache would not be updated because we
had no `composer.lock` (which hash is used as part of the cache key).

Generating `composer.lock` (but not installing packages) before we check
the cache fixes this.
This commit is contained in:
Bruce Weirdan 2023-03-12 02:01:01 -04:00
parent f48b79063c
commit 08add38449
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D
4 changed files with 20 additions and 0 deletions

View File

@ -23,6 +23,10 @@ jobs:
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
with:

View File

@ -52,6 +52,10 @@ jobs:
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
with:

View File

@ -24,6 +24,10 @@ jobs:
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
with:
@ -97,6 +101,10 @@ jobs:
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
with:

View File

@ -69,6 +69,10 @@ jobs:
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
shell: bash
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v3
with: