Skip to content

Commit 372b77b

Browse files
chore(ci): improve php test
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
1 parent fbcc51b commit 372b77b

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/php-test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,40 @@ name: PHP Tests
44
on: pull_request
55

66
jobs:
7+
changes:
8+
runs-on: ubuntu-latest-low
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
13+
outputs:
14+
src: ${{ steps.changes.outputs.src}}
15+
16+
steps:
17+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
18+
id: changes
19+
continue-on-error: true
20+
with:
21+
filters: |
22+
src:
23+
- '.github/workflows/**'
24+
- 'lib/**'
25+
- 'appinfo/**'
26+
- 'composer/**'
27+
- 'templates/**'
28+
- 'tests/php/**'
29+
- 'composer.json'
30+
- 'composer.lock'
31+
- 'phpunit.integration.xml'
32+
- 'phpunit.unit.xml'
33+
- '**.php'
34+
735
unit-tests:
836
runs-on: ubuntu-latest
37+
38+
needs: changes
39+
if: needs.changes.outputs.src != 'false'
40+
941
strategy:
1042
matrix:
1143
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]
@@ -53,6 +85,10 @@ jobs:
5385

5486
integration-tests:
5587
runs-on: ubuntu-latest
88+
89+
needs: changes
90+
if: needs.changes.outputs.src != 'false'
91+
5692
strategy:
5793
matrix:
5894
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]

0 commit comments

Comments
 (0)