53 lines (44 loc) · 1.44 KB
/
codeigniter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Codeigniter
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
lint:
name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-version:
- '8.0'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@e04e1d97f0c0481c6e1ba40f8a538454fe5d7709
with:
php-version: ${{ matrix.php-version }}
extensions: tokenizer
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-
${{ runner.os }}-
- name: Install dependencies
run: composer update --ansi --no-interaction
- name: Run lint on `app/`, `admin/`, `public/`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --config=.no-header.php-cs-fixer.dist.php --using-cache=no --diff
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply action changes