Skip to content

Commit a4c105e

Browse files
ruudkondrejmirtes
authored andcommitted
Run PHPUnit downgrade before composer install
1 parent b9aca46 commit a4c105e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/build.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737
- name: "Validate Composer"
3838
run: "composer validate"
3939

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

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

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

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

@@ -145,6 +145,10 @@ jobs:
145145
extensions: mbstring
146146
tools: composer:v2
147147

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

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

0 commit comments

Comments
 (0)