-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.45 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
jobs:
check-cs:
name: Coding Style
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
extensions: intl
php-version: 8.2
tools: composer
- name: "Set composer cache directory"
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache composer"
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-phpcsfixer-${{ hashFiles('tools/php-cs-fixer/composer.lock') }}
restore-keys: composer-phpcsfixer-
- name: "Cache phpcsfixer"
uses: actions/cache@v4
with:
path: var/.php-cs-fixer.cache
key: phpcsfixer-${{ github.sha }}
restore-keys: phpcsfixer-
- name: "Composer install"
id: install
run: composer install --no-interaction --no-progress --working-dir=tools/php-cs-fixer
- name: "PHP-CS-Fixer"
run: ./tools/php-cs-fixer/vendor/bin/php-cs-fixer check