You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.7 KiB
47 lines
1.7 KiB
name: PHP format code 🔎
|
|
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
operating-system: [ubuntu-latest]
|
|
php-versions: ['8.2']
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP, with composer and extensions
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, gd, json, soap, zip, bcmath
|
|
ini-values: post_max_size=256M, max_execution_time=600, memory_limit=4096M
|
|
|
|
- name: Get composer cache directory
|
|
id: composer-cache
|
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache composer dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
# Use composer.json for key, if composer.lock is not committed.
|
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
restore-keys: ${{ runner.os }}-composer-
|
|
|
|
- name: Install dependencies with composer
|
|
run: composer install --no-progress
|
|
|
|
- name: ecs (easy-coding-standard)
|
|
id: analyse
|
|
run: vendor/bin/ecs check
|
|
|