-
-
Notifications
You must be signed in to change notification settings - Fork 436
140 lines (126 loc) · 3.41 KB
/
workflow.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
paths:
- '.github/workflows/*'
- 'composer.json'
- 'composer.lock'
- '**.php'
- '**.phtml'
- '**.js'
- '**.xml'
- '.php-cs-fixer.dist.php'
- '.phpcs.dist.xml'
- '.phpcs.dist.ecg.xml'
- '.phpcs.dist.php.xml'
- '.phpstan.dist.neon'
- '.phpstan.dist.baseline.neon'
pull_request:
paths:
- '.github/workflows/*'
- 'composer.json'
- 'composer.lock'
- '**.php'
- '**.phtml'
- '**.js'
- '**.xml'
- '.php-cs-fixer.dist.php'
- '.phpcs.dist.xml'
- '.phpcs.dist.ecg.xml'
- '.phpcs.dist.php.xml'
- '.phpstan.dist.neon'
- '.phpstan.dist.baseline.neon'
jobs:
debug:
name: Debug
runs-on: [ubuntu-latest]
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
check:
name: Check files
uses: ./.github/workflows/check-files.yml
composer:
name: Composer
needs: [check]
# if: |
# needs.check.outputs.composer > 0 ||
# needs.check.outputs.workflow > 0
uses: ./.github/workflows/composer.yml
code_ql:
name: Code-QL
needs: [check]
if: |
needs.check.outputs.js > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/codeql-analysis.yml
phpcs:
name: PHP CS
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.phpcs > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/phpcs.yml
php-cs-fixer:
name: PHP CS Fixer
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.php-cs-fixer > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/php-cs-fixer.yml
phpmd:
name: PHPMD
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.phpmd > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/phpmd.yml
phpstan:
name: PHPStan
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.phtml > 0 ||
needs.check.outputs.phpstan > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/phpstan.yml
# DOES NOT run by default
# runs on schedule or when workflow changed
syntax_php:
name: PHP Syntax
needs: [check, php-cs-fixer]
if: needs.check.outputs.workflow > 0
uses: ./.github/workflows/syntax-php.yml
syntax_xml:
name: XML Syntax
needs: [check]
if: needs.check.outputs.xml > 0
uses: ./.github/workflows/syntax-xml.yml
rector:
name: Rector
needs: [check, phpcs, php-cs-fixer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/rector.yml
# DOES NOT run by default
# runs on schedule or when workflow or unit tests changed
unit_tests:
name: Unit Tests (OpenMage)
needs: [check, php-cs-fixer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.phpunit-test > 0 ||
needs.check.outputs.phpunit > 0 ||
needs.check.outputs.workflow > 0
uses: ./.github/workflows/phpunit.yml