-
-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (73 loc) · 2.47 KB
/
ci-linux.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Linux
on:
push:
branches:
- master
- develop
- 'feature/*'
- 'hotfix/*'
- 'release/*'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
name: "Lint on PHP ${{ matrix.php-versions }}"
strategy:
matrix:
php-versions: [ '8.1', '8.3' ]
coverage: [none]
fail-fast: false
steps:
- name: PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer
coverage: ${{ matrix.coverage }}
- name: Checkout Galette core
uses: actions/checkout@v4
with:
repository: galette/galette
path: galette-core
fetch-depth: 1
ref: develop
- name: Checkout plugin
uses: actions/checkout@v4
with:
path: galette-core/galette/plugins/plugin-objectslend
- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
cd galette-core/galette
composer install --ignore-platform-reqs
- name: CS
run: |
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/phpcs lib/ ./*.php
- name: Twig CS
run: |
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/twigcs templates/default --severity error --display blocking
- name: Check missing symbols
run: |
cd galette-core/galette/plugins/plugin-objectslend
composer require maglnet/composer-require-checker -W
vendor/bin/composer-require-checker check --config-file=.composer-require-checker.config.json ../../composer.json
if: matrix.php-versions == '8.3'
- name: PHPStan checks
run: |
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/phpstan analyze --ansi --memory-limit=2G --no-interaction --no-progress
- name: Headers checks
run: |
cd galette-core/galette/plugins/plugin-objectslend
../../vendor/bin/docheader --docheader=../../../.docheader check lib ./*.php