Skip to content

Merge pull request #7 from szepeviktor/patch-2 #536

Merge pull request #7 from szepeviktor/patch-2

Merge pull request #7 from szepeviktor/patch-2 #536

Workflow file for this run

name: Tests
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
analysis:
name: '[analysis] PHP ${{ matrix.php-version }}, ${{ matrix.dependency-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2']
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run lint
run: find ./src ./tests -type f -name "*.php" -print0 | xargs -0 -P10 -n1 -- php -l
- name: Run coding standards check
run: composer run cs-fix-dry
- name: Run static analysis
run: composer run analyze
test:
name: '[test] PHP ${{ matrix.php-version }}, ${{ matrix.dependency-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
dependency-version: [prefer-lowest, prefer-stable]
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
- name: Run lint
run: find ./src ./tests -type f -name "*.php" -print0 | xargs -0 -P10 -n1 -- php -l
- name: Run unit test
run: composer run test