[CI] (Re-)use ramsey/composer-install action when possible#2885
Conversation
| - name: Get composer cache directory | ||
| id: composer-cache | ||
| run: | | ||
| echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache packages dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.composer-cache.outputs.dir }} | ||
| key: ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}-${{ hashFiles('src/**/composer.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }} | ||
|
|
||
| - name: Install root dependencies | ||
| run: composer install | ||
| uses: ramsey/composer-install@v3 | ||
| with: | ||
| working-directory: ${{ github.workspace }} |
There was a problem hiding this comment.
Manually caching Composer dependencies is still necessary because dependencies are parallelly installed through composer, which AFAIK is not possible with ramsey/composer-install
| - name: Get composer cache directory | ||
| id: composer-cache | ||
| run: | | ||
| echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache packages dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.composer-cache.outputs.dir }} | ||
| key: ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}-${{ hashFiles('src/**/composer.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }} | ||
|
|
||
| - name: Install root dependencies | ||
| run: composer install | ||
| uses: ramsey/composer-install@v3 | ||
| with: | ||
| working-directory: ${{ github.workspace }} |
There was a problem hiding this comment.
Manually caching Composer dependencies is still necessary because dependencies are parallelly installed through composer, which AFAIK is not possible with ramsey/composer-install
There was a problem hiding this comment.
Genuine questiin, do we still need ramsey then here ?
There was a problem hiding this comment.
That's for root dependencies, the one defined here: https://github.com/symfony/ux/blob/2.x/composer.json
Using ramsey/composer-install here makes sense, as we install root dependencies across 6 CI workflows/jobs, which share the same cache keys.
|
I'm a bit lost and do not understand why we have soo many test jobs... but i trust you here so: 👍 |
The CI has been modified during the last few months, we have:
|
cf42993 to
71f9723
Compare
Replace #2882