Skip to content

Commit

Permalink
Clone code to detect code changes for non-PR events (#4915)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard authored Jun 15, 2023
1 parent 67f5483 commit a84dd6c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v3
# dorny/paths-filter needs git clone for push events
# dorny/paths-filter needs git clone for non-PR events
# https://github.com/marketplace/actions/paths-changes-filter#supported-workflows
if: github.event_name == 'push'
if: github.event_name != 'pull_request'
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
Expand All @@ -59,7 +59,7 @@ jobs:
linux:
# only run test suite if there are code changes
needs: changes
if: needs.changes.outputs.code == 'true'
if: github.event_name == 'schedule' || needs.changes.outputs.code == 'true'

runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
windows:
# only run test suite if there are code changes
needs: changes
if: needs.changes.outputs.code == 'true'
if: github.event_name == 'schedule' || needs.changes.outputs.code == 'true'

runs-on: windows-2019
strategy:
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
macos:
# only run test suite if there are code changes
needs: changes
if: needs.changes.outputs.code == 'true'
if: github.event_name == 'schedule' || needs.changes.outputs.code == 'true'

runs-on: macos-11
defaults:
Expand Down Expand Up @@ -385,7 +385,7 @@ jobs:
aggregate:
# only aggregate test suite if there are code changes
needs: [changes, linux, windows, macos]
if: always() && needs.changes.outputs.code == 'true'
if: always() && (github.event_name == 'schedule' || needs.changes.outputs.code == 'true')

runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit a84dd6c

Please sign in to comment.