-
-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (44 loc) · 1.4 KB
/
check-coding-style.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
54
55
56
name: Check Coding Style
on:
push:
branches:
- 'cake5'
- 'cake4'
- 'cake3'
pull_request:
branches:
- '*'
jobs:
check-coding-style:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get date part for cache key
id: key-date
run: echo "::set-output name=date::$(date +'%Y-%m')"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ github.ref }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-${{ github.ref }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --no-interaction
- name: Run cs check command
run: composer cs-check