Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,39 @@ on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- '**.md'
- 'docs/**'
branches:
- main

jobs:
check-tests:
permissions:
pull-requests: read
runs-on: ${{ matrix.os }}
outputs:
needed: ${{ steps.filter.outputs.changed }}
steps:
- name: Paths Changes Filter
uses: dorny/paths-filter@v3.0.2
id: filter
with:
filters: |
changed:
- 'src/**'
- 'tests/**'
- '.github/workflows/**.yml'

no-tests-always-true:
name: Run if no tests
needs: check-tests
if: ${{ !needs.check-tests.outputs.needed }}
runs-on: ubuntu-latest
steps:
- name: Just runs
run: echo "This job is used to prevent the workflow status from showing as failed when no tests are run."

php-tests:
needs: check-tests
if: ${{ needs.check-tests.outputs.needed }}
permissions:
contents: write
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion docs/php_version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.