-
Notifications
You must be signed in to change notification settings - Fork 4
102 lines (87 loc) · 2.98 KB
/
Copy pathci-linux.yml
File metadata and controls
102 lines (87 loc) · 2.98 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Linux
on:
push:
branches:
- master
- develop
tags:
# release tags only, the Release workflow builds those
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
pull_request:
# Enable manual run
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
setup-lint-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.gen.outputs.matrix }}
steps:
- uses: actions/checkout@v7
- id: gen
uses: galette/.github/actions/matrix-generator@main
with:
target: lint
all-jobs: ${{ github.event_name != 'pull_request' && github.repository == 'galette-plugins/plugin-fullcard' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags')) }}
lint:
runs-on: ubuntu-latest
needs: setup-lint-matrix
name: "Lint on PHP ${{ matrix.php-version }}"
strategy:
matrix: ${{ fromJSON(needs.setup-lint-matrix.outputs.matrix) }}
fail-fast: false
steps:
- name: PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
coverage: ${{ matrix.coverage }}
- name: Checkout Galette core
uses: actions/checkout@v7
with:
repository: galette/galette
path: galette-core
fetch-depth: 1
ref: develop
- name: Checkout plugin
uses: actions/checkout@v7
with:
path: galette-core/galette/plugins/plugin-fullcard
- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v6
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
composer install --ignore-platform-reqs
- name: CS
run: |
cd galette-core/galette/plugins/plugin-fullcard
../../vendor/bin/phpcs lib/ ./*.php
- name: CS Fixer
if: matrix.php-is-min
run: |
cd galette-core/galette/plugins/plugin-fullcard
../../vendor/bin/php-cs-fixer check --show-progress=dots --verbose --diff
- name: PHPStan checks
run: |
cd galette-core/galette/plugins/plugin-fullcard
../../vendor/bin/phpstan analyze --ansi --memory-limit=2G --no-interaction --no-progress
- name: Headers checks
run: |
cd galette-core
./bin/console galette:headers:check \
--project-name="Galette Fullcard plugin" \
--start-year="2011" \
--directory="galette/plugins/plugin-fullcard"