Skip to content

code style

code style #2744

Workflow file for this run

name: code style
on:
schedule:
- cron: '0 2 * * *'
push:
branches:
- develop
paths:
- Language/**
- tests/Language/**
- utils/**
- .github/scripts/continuous-integration
- .github/workflows/code-style.yml
pull_request:
branches:
- develop
paths:
- Language/**
- tests/Language/**
- utils/**
- .github/scripts/continuous-integration
- .github/workflows/code-style.yml
permissions:
contents: read
concurrency:
group: code-style-${{ github.ref }}
cancel-in-progress: true
jobs:
main:
name: Code Style Check [PHP ${{ matrix.php-version }}]
runs-on: ubuntu-24.04
if: github.repository == 'codeigniter4/translations'
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.5']
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: ${{ matrix.php-version }}
extensions: tokenizer
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: composer-PHP_${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-PHP_${{ matrix.php-version }}-
- name: Install dependencies on tools
run: composer update --ansi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run PHP CS Fixer
run: composer cs