Skip to content

Code Styles

Code Styles #268

Workflow file for this run

name: Code Styles
on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'
jobs:
code-styles:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-versions: [ '8.3' ]
wordpress-versions: [ '6.7' ]
operating-system: [ ubuntu-24.04 ]
steps:
- name: Install Packages
run: sudo apt install -y subversion
- name: Setup PHP
# Commit hash for v2.32.0: https://github.com/shivammathur/setup-php/releases/tag/2.32.0
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
- name: Checkout utm.codes
# Commit hash for v3.5.3: https://github.com/actions/checkout/releases/tag/v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup PHPCS
run: |
composer install
./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
./vendor/bin/phpcs --config-set ignore_errors_on_exit 1
./vendor/bin/phpcs --config-set show_progress 1
./vendor/bin/phpcs --config-set colors 1
- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
lsb_release -a
./vendor/bin/phpcs --version
./vendor/bin/phpcs -i
- name: PHP Compatibility
run: |
./vendor/bin/phpcs --standard=PHPCompatibility -p --runtime-set testVersion 5.6- ./index.php ./utm-dot-codes.php ./classes
- name: WordPress Code Standards
run: |
./vendor/bin/phpcs --standard=WordPress --report=summary ./index.php ./utm-dot-codes.php ./classes