Skip to content

Commit 977b1b2

Browse files
committed
Deduplicate dependency installation and scope push trigger
With no composer.lock tracked, ramsey/composer-install already resolved everything, leaving the following 'composer update' a no-op. Ask the action for the highest versions instead: one resolve, download cache retained. Scoping push to master stops PR branches running the suite twice.
1 parent a5f5171 commit 977b1b2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: "Continuous Integration"
33
on:
44
pull_request:
55
push:
6+
branches:
7+
- master
68

79
permissions:
810
contents: read
@@ -30,11 +32,11 @@ jobs:
3032
ini-values: "memory_limit=-1, phar.readonly=0"
3133
php-version: ${{ matrix.php }}
3234

33-
- name: Install dependencies
34-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
35-
3635
- name: "Install dependencies"
37-
run: composer update --no-progress -o --prefer-dist
36+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
37+
with:
38+
dependency-versions: highest
39+
composer-options: "-o --prefer-dist"
3840

3941
- name: "Run PHPUnit"
4042
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)