Skip to content

Commit 5622c89

Browse files
committed
minor #1468 CI: Share composer cache across php versions (rosier)
This PR was merged into the main branch. Discussion ---------- CI: Share composer cache across php versions Composer installs the dependencies from a composer.lock file The result doesn't depend on the PHP version that is used in CI Commits ------- 5adaef4 Share composer cache across php versions
2 parents 860f7c0 + 5adaef4 commit 5622c89

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/lint.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ jobs:
5252
uses: actions/cache@v3
5353
with:
5454
path: ${{ steps.composer-cache.outputs.dir }}
55-
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}
56-
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
55+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
56+
restore-keys: ${{ runner.os }}-composer-
5757

58-
- name: "Composer install"
59-
run: composer install --no-interaction --no-progress
58+
- name: "Install dependencies"
59+
run: composer install --ansi --no-interaction --no-progress
6060

6161
- name: Install PHPUnit
6262
id: install

.github/workflows/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
uses: actions/cache@v3
5656
with:
5757
path: ${{ steps.composer-cache.outputs.dir }}
58-
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
59-
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
58+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
59+
restore-keys: ${{ runner.os }}-composer-
6060

6161
- name: "Install dependencies"
62-
run: composer install --no-interaction --no-progress
62+
run: composer install --ansi --no-interaction --no-progress
6363

6464
- name: "Install PHPUnit"
6565
run: vendor/bin/simple-phpunit install

0 commit comments

Comments
 (0)