@@ -3,6 +3,9 @@ name: "Review PR"
3
3
on :
4
4
pull_request :
5
5
6
+ env :
7
+ COMPOSER_FLAGS : --ansi --no-interaction --no-progress --prefer-dist
8
+
6
9
jobs :
7
10
8
11
# This job ensures the coding standard is followed
@@ -28,12 +31,11 @@ jobs:
28
31
- name : " Use Cache"
29
32
uses : " actions/cache@v2"
30
33
with :
31
- path : |
32
- ~/.composer/cache
33
- key : " php-${{ matrix.php-version }}-highest"
34
- restore-keys : " php-${{ matrix.php-version }}-highest"
35
- - name : " Install highest dependencies"
36
- run : " composer update --no-interaction --no-progress"
34
+ path : ~/.composer/cache
35
+ key : " composer-cache"
36
+ restore-keys : " composer-cache"
37
+ - name : " Install dependencies"
38
+ run : " composer install ${{ env.COMPOSER_FLAGS }}"
37
39
- name : " Coding Standard"
38
40
run : " vendor/bin/php-cs-fixer fix -vvv --dry-run --format=checkstyle | cs2pr"
39
41
@@ -59,12 +61,11 @@ jobs:
59
61
- name : " Use Cache"
60
62
uses : " actions/cache@v2"
61
63
with :
62
- path : |
63
- ~/.composer/cache
64
- key : " php-${{ matrix.php-version }}-highest"
65
- restore-keys : " php-${{ matrix.php-version }}-highest"
66
- - name : " Install highest dependencies"
67
- run : " composer update --no-interaction --no-progress"
64
+ path : ~/.composer/cache
65
+ key : " composer-cache"
66
+ restore-keys : " composer-cache"
67
+ - name : " Install dependencies"
68
+ run : " composer install ${{ env.COMPOSER_FLAGS }}"
68
69
- name : " Run Psalm"
69
70
run : " vendor/bin/psalm --output-format=github --shepherd --stats"
70
71
@@ -94,18 +95,14 @@ jobs:
94
95
- name : " Use Cache"
95
96
uses : " actions/cache@v2"
96
97
with :
97
- path : |
98
- ~/.composer/cache
99
- key : " php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
100
- restore-keys : " php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
98
+ path : ~/.composer/cache
99
+ key : " composer-cache"
100
+ restore-keys : " composer-cache"
101
101
- name : " Install lowest dependencies"
102
102
if : ${{ matrix.dependencies == 'lowest' }}
103
- run : " composer update --prefer-lowest --no-interaction --no-progress --ignore-platform-reqs"
103
+ run : " composer update ${{ env.COMPOSER_FLAGS }} --prefer-lowest --ignore-platform-reqs"
104
104
- name : " Install highest dependencies"
105
105
if : ${{ matrix.dependencies == 'highest' }}
106
- run : " composer update --no-interaction --no-progress --ignore-platform-reqs"
107
- # - name: "Install locked dependencies"
108
- # if: ${{ matrix.dependencies == 'locked' }}
109
- # run: "composer install --no-interaction --no-progress --ignore-platform-reqs"
106
+ run : " composer update ${{ env.COMPOSER_FLAGS }} --ignore-platform-reqs"
110
107
- name : " Run PHPUnit"
111
108
run : " vendor/bin/phpunit --testdox --coverage-text"
0 commit comments