Skip to content
Merged
15 changes: 15 additions & 0 deletions .github/filters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
backend:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/php/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer/**'
- 'composer.json'
- 'composer.lock'
- 'phpunit.integration.xml'
- 'phpunit.unit'
- '.php-cs-fixer.dist.php'
- 'psalm.xml'
19 changes: 19 additions & 0 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,27 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 1
sparse-checkout: .github/filters.yaml
sparse-checkout-cone-mode: false
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
filters: .github/filters.yaml

lint:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.backend != 'false'

name: php-cs

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,27 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 1
sparse-checkout: .github/filters.yaml
sparse-checkout-cone-mode: false
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
filters: .github/filters.yaml

matrix:
runs-on: ubuntu-latest-low
needs: changes
if: needs.changes.outputs.backend != 'false'
outputs:
php-min: ${{ steps.versions.outputs.php-min }}
php-max: ${{ steps.versions.outputs.php-max }}
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/php-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@ name: PHP Tests
on: pull_request

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 1
sparse-checkout: .github/filters.yaml
sparse-checkout-cone-mode: false
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
filters: .github/filters.yaml

unit-tests:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.backend != 'false'
strategy:
matrix:
php-versions: [ '8.3', '8.4', '8.5' ]
Expand Down Expand Up @@ -55,6 +74,8 @@ jobs:

integration-tests:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.backend != 'false'
strategy:
matrix:
php-versions: [ '8.3', '8.4', '8.5' ]
Expand Down Expand Up @@ -96,7 +117,7 @@ jobs:
run: composer run test:integration

summary:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-low
needs:
- unit-tests
- integration-tests
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/psalm-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,27 @@ permissions:
contents: read

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 1
sparse-checkout: .github/filters.yaml
sparse-checkout-cone-mode: false
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: changes
continue-on-error: true
with:
filters: .github/filters.yaml

matrix:
runs-on: ubuntu-latest-low
needs: changes
if: needs.changes.outputs.backend != 'false'
outputs:
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
steps:
Expand Down
Loading