Skip to content

Commit 5ffe878

Browse files
committed
Run PHPUnit downgrade before composer install
1 parent c6f9b87 commit 5ffe878

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
- name: "Validate Composer"
3737
run: "composer validate"
3838

39-
- name: "Install dependencies"
40-
run: "composer install --no-interaction --no-progress --no-suggest"
41-
4239
- name: "Downgrade PHPUnit"
4340
if: matrix.php-version == '7.1' || matrix.php-version == '7.2' || matrix.php-version == '7.3'
44-
run: "composer require --dev phpunit/phpunit:^7.5.20 --update-with-dependencies"
41+
run: "composer require --dev phpunit/phpunit:^7.5.20 --no-update --update-with-dependencies"
42+
43+
- name: "Install dependencies"
44+
run: "composer install --no-interaction --no-progress --no-suggest"
4545

4646
- name: "Lint"
4747
run: "make lint"
@@ -100,6 +100,10 @@ jobs:
100100
coverage: "none"
101101
php-version: "${{ matrix.php-version }}"
102102

103+
- name: "Downgrade PHPUnit"
104+
if: matrix.php-version == '7.1' || matrix.php-version == '7.2' || matrix.php-version == '7.3'
105+
run: "composer require --dev phpunit/phpunit:^7.5.20 --no-update --update-with-dependencies"
106+
103107
- name: "Install lowest dependencies"
104108
if: ${{ matrix.dependencies == 'lowest' }}
105109
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
@@ -108,10 +112,6 @@ jobs:
108112
if: ${{ matrix.dependencies == 'highest' }}
109113
run: "composer update --no-interaction --no-progress --no-suggest"
110114

111-
- name: "Downgrade PHPUnit"
112-
if: matrix.php-version == '7.1' || matrix.php-version == '7.2' || matrix.php-version == '7.3'
113-
run: "composer require --dev phpunit/phpunit:^7.5.20 --update-with-dependencies"
114-
115115
- name: "Tests"
116116
run: "make tests"
117117

@@ -144,6 +144,10 @@ jobs:
144144
extensions: mbstring
145145
tools: composer:v2
146146

147+
- name: "Downgrade PHPUnit"
148+
if: matrix.php-version == '7.1' || matrix.php-version == '7.2' || matrix.php-version == '7.3'
149+
run: "composer require --dev phpunit/phpunit:^7.5.20 --no-update --update-with-dependencies"
150+
147151
- name: "Install lowest dependencies"
148152
if: ${{ matrix.dependencies == 'lowest' }}
149153
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
@@ -152,9 +156,5 @@ jobs:
152156
if: ${{ matrix.dependencies == 'highest' }}
153157
run: "composer update --no-interaction --no-progress --no-suggest"
154158

155-
- name: "Downgrade PHPUnit"
156-
if: matrix.php-version == '7.1' || matrix.php-version == '7.2' || matrix.php-version == '7.3'
157-
run: "composer require --dev phpunit/phpunit:^7.5.20 --update-with-dependencies"
158-
159159
- name: "PHPStan"
160160
run: "make phpstan"

0 commit comments

Comments
 (0)