-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.67 KB
/
php-code-quality.yml
File metadata and controls
60 lines (53 loc) · 1.67 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
name: Code Quality
on:
workflow_call:
inputs:
command:
default: "phpstan"
required: false
type: "string"
php:
default: "8.1"
required: false
type: string
dependency-versions:
default: "locked"
required: false
type: "string"
working-directory:
default: "."
required: false
type: "string"
jobs:
tests:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 10
name: ${{ inputs.command }} PHP ${{ inputs.php }}
steps:
- name: Send Deprecation Warning
run: |
echo "::warning title=Workflow Deprecated::This workflow (php-code-quality) is deprecated and will be removed in a future version. Please migrate to the @alleyinteractive/action-test-php action (https://github.com/alleyinteractive/action-test-php)."
shell: bash
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php }}
tools: composer:v2
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
working-directory: ${{ inputs.working-directory }}
composer-options: "--no-progress --no-ansi --no-interaction --prefer-dist"
dependency-versions: ${{ inputs.dependency-versions }}
- name: Validate Composer
run: composer validate --strict
- name: Run ${{ inputs.command }}
run: composer run ${{ inputs.command }}