Skip to content

Commit 1834262

Browse files
committed
chore: phpcsfixer.yml uses workflow in codeigniter4/.github
1 parent 306616c commit 1834262

1 file changed

Lines changed: 2 additions & 52 deletions

File tree

.github/workflows/phpcsfixer.yml

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,8 @@ name: PHPCSFixer
22

33
on:
44
pull_request:
5-
branches:
6-
- develop
7-
paths:
8-
- '**.php'
9-
- '.github/workflows/phpcsfixer.yml'
105
push:
11-
branches:
12-
- develop
13-
paths:
14-
- '**.php'
15-
- '.github/workflows/phpcsfixer.yml'
166

177
jobs:
18-
build:
19-
name: PHP ${{ matrix.php-versions }} Coding Standards
20-
runs-on: ubuntu-latest
21-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
php-versions: ['7.4', '8.0', '8.1']
26-
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
31-
- name: Set up PHP
32-
uses: shivammathur/setup-php@v2
33-
with:
34-
php-version: ${{ matrix.php-versions }}
35-
extensions: json, tokenizer
36-
coverage: none
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
40-
- name: Get composer cache directory
41-
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
42-
43-
- name: Cache composer dependencies
44-
uses: actions/cache@v3
45-
with:
46-
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
47-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
48-
restore-keys: ${{ runner.os }}-composer-
49-
50-
- name: Install dependencies
51-
run: |
52-
if [ -f composer.lock ]; then
53-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
54-
else
55-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
56-
fi
57-
58-
- name: Check code for standards compliance
59-
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
8+
phpcsfixer:
9+
uses: codeigniter4/.github/.github/workflows/phpcsfixer.yml@main

0 commit comments

Comments
 (0)