Skip to content

Prepare 1.2.2 release #41

Prepare 1.2.2 release

Prepare 1.2.2 release #41

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
Build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '7.4'
- php-version: '8.0'
- php-version: '8.1'
job-description: with lint
lint: true
- php-version: '8.2'
- php-version: '8.3'
composer-flags: '--ignore-platform-req=php'
name: PHP ${{ matrix.php-version }} ${{ matrix.job-description }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ctype, mbstring
tools: cs2pr
- name: Get Composer's cache directory
id: composer-cache-path
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
id: composer-cache
with:
path: ${{ steps.composer-cache-path.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.composer-flags }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
env:
COMPOSER_ROOT_VERSION: "1.99.99"
run: composer install ${{ matrix.composer-flags }}
- name: Normalize composer.json
if: matrix.lint
run: composer normalize --dry-run
- name: PHP-CS-Fixer
if: matrix.lint
run: vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
# https://github.com/marketplace/actions/setup-php-action#phpunit
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: PHPUnit
run: vendor/bin/phpunit