Fix PHP version used by testing workflow

The fix is to use the action `shivammathur/setup-php@v2` to setup the proper PHP version in the test runner, replacing `php-actions/composer` which only ensured using the desired PHP version while installing the project dependencies.
This commit is contained in:
Ismael Ambrosi 2022-04-18 00:49:16 -03:00
parent c3ac15bfb9
commit 8514097ce1
No known key found for this signature in database
GPG key ID: 6D33D4E4414157CD
2 changed files with 13 additions and 12 deletions

View file

@ -19,13 +19,13 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Composer install
uses: php-actions/composer@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
command: install
args: --ignore-platform-reqs --no-scripts
version: 2
php_version: 8.0
php-version: 8.0
tools: composer:v2
- name: Composer install
run: composer install --ignore-platform-reqs --no-scripts
- name: PHPStan
run: ./vendor/bin/phpstan analyse
- name: PHP Code Sniffer

View file

@ -22,17 +22,18 @@ jobs:
- php: 8.1
coveralls: false
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Composer install
uses: php-actions/composer@v5
with:
command: install
args: --ignore-platform-reqs --no-scripts
version: 2
php_version: ${{ matrix.php }}
run: composer install --ignore-platform-reqs --no-scripts
- name: Run tests
env:
XDEBUG_MODE: coverage