Skip to content

Commit dec6495

Browse files
authored
ci: add paths filters to caller workflows (#14)
Scopes each migrated CI workflow to the file types that affect it, following the recommended caller stanzas documented in the github-workflows-public reusables. No behavior change beyond skipping runs on irrelevant paths.
1 parent 5deac8d commit dec6495

8 files changed

Lines changed: 82 additions & 0 deletions

File tree

.github/workflows/composer-normalize.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- composer.json
9+
- .github/workflows/composer-normalize.yml
710
pull_request:
811
branches:
912
- main
13+
paths:
14+
- composer.json
15+
- .github/workflows/composer-normalize.yml
1016

1117
jobs:
1218
composer-normalize:

.github/workflows/composer-require-checker.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- composer.json
9+
- composer.lock
10+
- '**.php'
11+
- .composer-require-checker.json
12+
- .github/workflows/composer-require-checker.yml
713
pull_request:
814
branches:
915
- main
16+
paths:
17+
- composer.json
18+
- composer.lock
19+
- '**.php'
20+
- .composer-require-checker.json
21+
- .github/workflows/composer-require-checker.yml
1022

1123
jobs:
1224
composer-require-checker:

.github/workflows/composer-validate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- composer.json
9+
- .github/workflows/composer-validate.yml
710
pull_request:
811
branches:
912
- main
13+
paths:
14+
- composer.json
15+
- .github/workflows/composer-validate.yml
1016

1117
jobs:
1218
composer-validate:

.github/workflows/php-syntax-check.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- '**.php'
9+
- .github/workflows/php-syntax-check.yml
710
pull_request:
811
branches:
912
- main
13+
paths:
14+
- '**.php'
15+
- .github/workflows/php-syntax-check.yml
1016

1117
jobs:
1218
php-syntax-check:

.github/workflows/phpcs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- '**.php'
9+
- .phpcs.xml*
10+
- phpcs.xml*
11+
- .github/workflows/phpcs.yml
712
pull_request:
813
branches:
914
- main
15+
paths:
16+
- '**.php'
17+
- .phpcs.xml*
18+
- phpcs.xml*
19+
- .github/workflows/phpcs.yml
1020

1121
jobs:
1222
phpcs:

.github/workflows/phpstan.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,25 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- '**.php'
9+
- phpstan.neon
10+
- phpstan.neon.dist
11+
- phpstan-baseline.neon
12+
- composer.json
13+
- composer.lock
14+
- .github/workflows/phpstan.yml
715
pull_request:
816
branches:
917
- main
18+
paths:
19+
- '**.php'
20+
- phpstan.neon
21+
- phpstan.neon.dist
22+
- phpstan-baseline.neon
23+
- composer.json
24+
- composer.lock
25+
- .github/workflows/phpstan.yml
1026

1127
jobs:
1228
phpstan:

.github/workflows/rector.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- '**.php'
9+
- rector.php
10+
- composer.json
11+
- composer.lock
12+
- .github/workflows/rector.yml
713
pull_request:
814
branches:
915
- main
16+
paths:
17+
- '**.php'
18+
- rector.php
19+
- composer.json
20+
- composer.lock
21+
- .github/workflows/rector.yml
1022

1123
jobs:
1224
rector:

.github/workflows/tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- '**.php'
9+
- composer.json
10+
- composer.lock
11+
- phpunit.xml
12+
- phpunit.xml.dist
13+
- .github/workflows/tests.yml
714
pull_request:
815
branches:
916
- main
17+
paths:
18+
- '**.php'
19+
- composer.json
20+
- composer.lock
21+
- phpunit.xml
22+
- phpunit.xml.dist
23+
- .github/workflows/tests.yml
1024

1125
jobs:
1226
test:

0 commit comments

Comments
 (0)