Skip to content

Commit

Permalink
add PHP version check before composer install #2
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Oct 10, 2023
1 parent 26da447 commit 81f7b9e
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,26 @@ jobs:
name: "PHP composer & CodeSniffer"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run PHP_CodeSniffer validations
run: vendor/bin/phpcs
- name: Run PHP_CodeSniffer validations
run: vendor/bin/phpcs

0 comments on commit 81f7b9e

Please sign in to comment.