Skip to content

Commit e60140d

Browse files
committed
GH Actions: run phar building test more selectively
This workflow is a safeguard to ensure that the PHAR files can be build against any of the supported PHP versions. There are only a few files involved in building the PHAR files, so there isn't really any need to run this workflow for every PR and every merge. It only really needs to run when any of the involved files have changed. Also, keep in mind that the PHAR which is distributed for releases is build on PHP 8.0 and will still be build in the `test` workflow for every PR and every merge, so the functionality of the distribution PHARs is still guaranteed either way.
1 parent 74bcb2e commit e60140d

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/build-phar.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
name: Build PHARs
22

33
on:
4-
# Run on pushes to master and on all pull requests.
4+
# Run on pushes to master and on pull requests which touch files used when building the PHARs.
55
# Prevent the build from running when there are only irrelevant changes.
66
push:
77
branches:
88
- master
99
- 4.0
10-
paths-ignore:
11-
- '**.md'
10+
paths:
11+
- '.github/workflows/build-phar.yml'
12+
- 'scripts/build-phar.php'
13+
- 'autoload.php'
14+
- 'src/Config.php'
15+
- 'src/Exceptions/RuntimeException.php'
16+
- 'src/Exceptions/TokenizerException.php'
17+
- 'src/Tokenizers/PHP.php'
18+
- 'src/Util/Tokens.php'
1219
pull_request:
20+
paths:
21+
- '.github/workflows/build-phar.yml'
22+
- 'scripts/build-phar.php'
23+
- 'autoload.php'
24+
- 'src/Config.php'
25+
- 'src/Exceptions/RuntimeException.php'
26+
- 'src/Exceptions/TokenizerException.php'
27+
- 'src/Tokenizers/PHP.php'
28+
- 'src/Util/Tokens.php'
29+
1330
# Allow manually triggering the workflow.
1431
workflow_dispatch:
1532

0 commit comments

Comments
 (0)