-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (36 loc) · 1.19 KB
/
shared-lint.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
name: "lint"
on:
workflow_call:
inputs:
operating-system:
type: string
required: true
description: "Operating system"
php-version:
type: string
required: true
description: "PHP version"
php-extensions:
type: string
required: true
description: "JSON array of PHP extensions"
jobs:
code-styling:
name: "Code Styling"
runs-on: ${{ inputs.operating-system }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }} # must validate user permissions PRIOR to checkout ⚠️
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: ${{ join(fromJson(inputs.php-extensions), ',') }}
- name: "Composer: Validate composer.json and composer.lock"
run: composer validate --strict
- name: "Composer: Install dependencies"
run: composer install --no-progress --no-interaction
- name: "Validate Code Styling"
run: composer aternus:style-check