Skip to content

chore: Sync changes from the template #19

chore: Sync changes from the template

chore: Sync changes from the template #19

Workflow file for this run

name: Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- next
- next-major
- beta
- alpha
jobs:
phpunit:
name: PHPUnit on PHP v${{ matrix.php }} & TestBench ${{ matrix.test-bench }}
strategy:
fail-fast: true
matrix:
php: [8.2]
test-bench: [^8.0]
runs-on: packages
container: chialab/php:${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Composer cache
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: |
composer require "orchestra/testbench=${{ matrix.test-bench }}" --dev --no-update
composer install --prefer-dist --no-progress
- name: Execute phpunit
run: composer test -- --colors=always
php-cs-fixer:
name: php-cs-fixer
runs-on: packages
container: chialab/php:8.2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Composer cache
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Execute php-cs-fixer
run: composer cs-fix -- --dry-run --diff --using-cache=no
prettier:
name: Prettier
runs-on: packages
container: node:22
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run prettier
uses: actionsx/prettier@v3
with:
args: --check .
phpstan:
name: PHPStan on PHP v${{ matrix.php }} & TestBench ${{ matrix.test-bench }}
strategy:
fail-fast: true
matrix:
php: [8.2]
test-bench: [^8.0]
runs-on: packages
container: chialab/php:${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Composer cache
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: |
composer require "orchestra/testbench=${{ matrix.test-bench }}" --dev --no-update
composer install --prefer-dist --no-progress
- name: Execute phpstan
run: composer phpstan