GitHub actions, normalization and support for PHP8

This commit is contained in:
Ismo Vuorinen
2022-02-10 16:59:07 +02:00
parent d70c7b63ea
commit 7ba2f6b6af
12 changed files with 174 additions and 76 deletions

View File

@@ -7,11 +7,27 @@ on:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['latest']
include:
- operating-system: 'ubuntu-latest'
php-versions: '7.3'
phpunit-versions: '8.5.21'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
@@ -22,15 +38,13 @@ jobs:
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: vendor/bin/phpunit
run: composer test