Skip to content

Commit 1a84fda

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 c88c241 commit 1a84fda

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,14 +1,31 @@
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
9-
paths-ignore:
10-
- '**.md'
9+
paths:
10+
- '.github/workflows/build-phar.yml'
11+
- 'scripts/build-phar.php'
12+
- 'autoload.php'
13+
- 'src/Config.php'
14+
- 'src/Exceptions/RuntimeException.php'
15+
- 'src/Exceptions/TokenizerException.php'
16+
- 'src/Tokenizers/PHP.php'
17+
- 'src/Util/Tokens.php'
1118
pull_request:
19+
paths:
20+
- '.github/workflows/build-phar.yml'
21+
- 'scripts/build-phar.php'
22+
- 'autoload.php'
23+
- 'src/Config.php'
24+
- 'src/Exceptions/RuntimeException.php'
25+
- 'src/Exceptions/TokenizerException.php'
26+
- 'src/Tokenizers/PHP.php'
27+
- 'src/Util/Tokens.php'
28+
1229
# Allow manually triggering the workflow.
1330
workflow_dispatch:
1431

0 commit comments

Comments
 (0)