-
-
Notifications
You must be signed in to change notification settings - Fork 367
[CI] (Re-)use ramsey/composer-install action when possible #2885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Genuine questiin, do we still need ramsey then here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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