Skip to content

Commit 81f7b9e

Browse files
committed
add PHP version check before composer install #2
1 parent 26da447 commit 81f7b9e

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

.github/workflows/php.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,26 @@ jobs:
4747
name: "PHP composer & CodeSniffer"
4848

4949
steps:
50-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v3
5151

52-
- name: Validate composer.json and composer.lock
53-
run: composer validate --strict
52+
- # check PHP version
53+
name: "Check PHP version"
54+
run: "php -v"
5455

55-
- name: Cache Composer packages
56-
id: composer-cache
57-
uses: actions/cache@v3
58-
with:
59-
path: vendor
60-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
61-
restore-keys: |
62-
${{ runner.os }}-php-
56+
- name: Validate composer.json and composer.lock
57+
run: composer validate --strict
58+
59+
- name: Cache Composer packages
60+
id: composer-cache
61+
uses: actions/cache@v3
62+
with:
63+
path: vendor
64+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
65+
restore-keys: |
66+
${{ runner.os }}-php-
6367
64-
- name: Install dependencies
65-
run: composer install --prefer-dist --no-progress
68+
- name: Install dependencies
69+
run: composer install --prefer-dist --no-progress
6670

67-
- name: Run PHP_CodeSniffer validations
68-
run: vendor/bin/phpcs
71+
- name: Run PHP_CodeSniffer validations
72+
run: vendor/bin/phpcs

0 commit comments

Comments
 (0)