Skip to content

Commit 6a404be

Browse files
committed
Make use of reusable workflows for QA
1 parent f807048 commit 6a404be

File tree

2 files changed

+51
-76
lines changed

2 files changed

+51
-76
lines changed

.github/workflows/php-qa.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PHP Quality Assurance
2+
3+
on:
4+
push:
5+
paths:
6+
- '**workflows/quality-assurance-php.yml'
7+
- '**.php'
8+
- '**phpcs.xml.dist'
9+
- '**phpunit.xml.dist'
10+
- '**psalm.xml'
11+
workflow_dispatch:
12+
inputs:
13+
jobs:
14+
required: true
15+
type: choice
16+
default: 'Run all'
17+
description: 'Choose jobs to run'
18+
options:
19+
- 'Run all'
20+
- 'Run PHPCS only'
21+
- 'Run Psalm only'
22+
- 'Run lint only'
23+
- 'Run static analysis'
24+
- 'Run unit tests only'
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
lint-php:
32+
uses: inpsyde/reusable-workflows/.github/workflows/lint-php.yml@main
33+
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run lint only') || (github.event.inputs.jobs == 'Run static analysis')) }}
34+
with:
35+
PHP_MATRIX: '["7.4", "8.0", "8.1", "8.2"]'
36+
LINT_ARGS: '-e php --colors --show-deprecated ./Inpsyde'
37+
38+
coding-standards-analysis-php:
39+
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run PHPCS only') || (github.event.inputs.jobs == 'Run static analysis')) }}
40+
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main
41+
42+
static-code-analysis-php:
43+
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run Psalm only') || (github.event.inputs.jobs == 'Run static analysis')) }}
44+
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main
45+
46+
tests-unit-php:
47+
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run unit tests only')) }}
48+
uses: inpsyde/reusable-workflows/.github/workflows/tests-unit-php.yml@main
49+
with:
50+
PHP_MATRIX: '["7.4", "8.0", "8.1", "8.2"]'
51+
PHPUNIT_ARGS: '--no-coverage'

0 commit comments

Comments
 (0)