-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (46 loc) · 1.73 KB
/
code_quality.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
48
49
50
51
52
53
54
55
56
57
58
59
name: Code Quality
on:
push:
branches: [ 0.x, 1.x, 2.x ]
paths-ignore:
- README.md
pull_request:
branches: [ 0.x, 1.x, 2.x ]
paths-ignore:
- README.md
jobs:
TwigCS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
- name: Composer - Get Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v4
id: cache-composer
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-php-${{ github.sha }}
restore-keys: composer-php-
- name: Composer - Create cache directory
run: mkdir -p /home/runner/.composer/cache
if: steps.cache-composer.outputs.cache-hit != 'true'
- name: Composer - Validate composer.json and composer.lock
run: composer validate --strict
- name: Composer - Update dependencies
run: composer update --no-progress
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install
run: npm install
- name: Lint
run: npm run lint
- name: TwigCS - Check
run: vendor/bin/twigcs templates/ --severity error --display blocking --reporter githubAction