Skip to content

Commit fa6c495

Browse files
CI improvements
1 parent 93590d4 commit fa6c495

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

.github/workflows/pr.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: "Review PR"
33
on:
44
pull_request:
55

6+
env:
7+
COMPOSER_FLAGS: --ansi --no-interaction --no-progress --prefer-dist
8+
69
jobs:
710

811
# This job ensures the coding standard is followed
@@ -28,12 +31,11 @@ jobs:
2831
- name: "Use Cache"
2932
uses: "actions/cache@v2"
3033
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 }}"
3739
- name: "Coding Standard"
3840
run: "vendor/bin/php-cs-fixer fix -vvv --dry-run --format=checkstyle | cs2pr"
3941

@@ -59,12 +61,11 @@ jobs:
5961
- name: "Use Cache"
6062
uses: "actions/cache@v2"
6163
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 }}"
6869
- name: "Run Psalm"
6970
run: "vendor/bin/psalm --output-format=github --shepherd --stats"
7071

@@ -94,18 +95,14 @@ jobs:
9495
- name: "Use Cache"
9596
uses: "actions/cache@v2"
9697
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"
101101
- name: "Install lowest dependencies"
102102
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"
104104
- name: "Install highest dependencies"
105105
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"
110107
- name: "Run PHPUnit"
111108
run: "vendor/bin/phpunit --testdox --coverage-text"

0 commit comments

Comments
 (0)