-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (44 loc) · 1.43 KB
/
Copy pathcoding-standard.yml
File metadata and controls
50 lines (44 loc) · 1.43 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
name: Coding Standard
on:
workflow_call:
inputs:
php-version:
description: "The PHP version to use when running the job"
default: "8.2"
required: false
type: "string"
composer-options:
description: "Additional flags for the composer install command."
default: "--prefer-dist"
required: false
type: "string"
working-directory:
description: "The working directory to run composer install in."
default: "."
required: false
type: "string"
config-file:
description: "The path to the ECS config file, relative to the working directory."
default: "ecs.php"
required: false
type: "string"
jobs:
coding-standard:
name: "Coding Standard (PHP ${{ inputs.php-version }})"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ inputs.php-version }}"
- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"
with:
working-directory: "${{ inputs.working-directory }}"
composer-options: "${{ inputs.composer-options }}"
- name: Run ECS
working-directory: "${{ inputs.working-directory }}"
run: "vendor/bin/ecs --config=${{ inputs.config-file }}"