Fix PHP builds (#134)

Pin image to specific version so that we don't get surprise failures
down the line.

Use common action to configure the default PHP version (the matrix
versions only affect test running).

Update PHP versions to supported versions in this image.
This commit is contained in:
Niklas Laxström
2020-12-21 16:58:18 +02:00
committed by GitHub
parent 17280471cc
commit 3d3f06592b

View File

@@ -4,13 +4,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
php: [7.2, 7.3]
php: [7.4]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --ansi
@@ -19,4 +24,4 @@ jobs:
run: composer run-script cs
- name: Run tests
run: php${{ matrix.php }} ./vendor/bin/phpunit
run: php ./vendor/bin/phpunit