Skip to content

chore: Rename devcontainer to project-specific name #625

chore: Rename devcontainer to project-specific name

chore: Rename devcontainer to project-specific name #625

Workflow file for this run

name: Tests
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
name: 'PHP Lint ${{ matrix.php-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Run lint
run: find ./src ./tests -type f -name "*.php" -print0 | xargs -0 -P10 -n1 -- php -l
php_cs_fixer:
name: 'PHP CS Fixer'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version-file: '.tool-versions'
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run coding standards check
run: composer run cs-fix-dry
phpstan:
name: 'PHPStan'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version-file: '.tool-versions'
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run static analysis
run: composer run analyze
typos:
name: "Check for typos"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v6
- name: "Check for typos"
uses: "crate-ci/[email protected]"
unit_tests:
name: 'Unit Test ${{ matrix.php-version }}, ${{ matrix.dependency-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5']
dependency-version: [prefer-lowest, prefer-stable]
steps:
- uses: actions/checkout@v6
- 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 unit tests
run: composer run test