-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (49 loc) · 1.58 KB
/
lint.yml
File metadata and controls
57 lines (49 loc) · 1.58 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
name: "Lint"
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
php-version:
description: "The PHP version to use when running the job"
default: "8.0"
required: false
type: "string"
php-extensions:
description: "The php extensions to install, allowing composer to pass"
default: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo"
required: false
type: "string"
composer-options:
description: "Additional flags for the composer validate command."
default: "--ansi --strict"
required: false
type: "string"
composer-file:
description: "Composer file to validate."
default: "composer.json"
required: false
type: "string"
jobs:
lint:
name: "Lint yaml & Composer"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "${{ inputs.php-version }}"
steps:
- name: "Checkout"
uses: "actions/checkout@v6"
- name: "Lint YAML files"
uses: "ibiqlik/action-yamllint@v3.1"
with:
config_file: ".yamllint.yaml"
file_or_dir: "."
strict: true
- name: "Set up PHP"
uses: "shivammathur/setup-php@2.37.0"
with:
coverage: "none"
extensions: "${{ inputs.php-extensions }}"
php-version: "${{ matrix.php-version }}"
- name: "Validate composer.json and composer.lock"
run: "composer validate ${{ inputs.composer-options }} ${{ inputs.composer-file }}"