Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
[improve][ci] Only run CodeQL when the PR contains changes to non-tes…
Browse files Browse the repository at this point in the history
…t java code (apache#22146)
  • Loading branch information
lhotari authored Feb 28, 2024
1 parent e3a081e commit 15a6c0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/changes-filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ docs:
- 'deployment/**'
- 'wiki/**'
- 'pip/**'
java_non_tests:
- '**/src/main/java/**/*.java'
tests:
- added|modified: '**/src/test/java/**/*.java'
need_owasp:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
need_owasp: ${{ steps.changes.outputs.need_owasp }}
collect_coverage: ${{ steps.check_coverage.outputs.collect_coverage }}
jdk_major_version: ${{ steps.jdk_major_version.outputs.jdk_major_version }}

java_non_tests: ${{ steps.changes.outputs.java_non_tests }}
steps:
- name: Cancel scheduled jobs in forks by default
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'schedule' }}
Expand Down Expand Up @@ -1338,7 +1338,7 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: ['preconditions', 'unit-tests']
if: ${{ needs.preconditions.outputs.docs_only != 'true' && ((github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name != 'pull_request' && github.ref_name == 'master')) }}
if: ${{ (needs.preconditions.outputs.java_non_tests == 'true' || github.event_name != 'pull_request') && ((github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name != 'pull_request' && github.ref_name == 'master')) }}
permissions:
actions: read
contents: read
Expand Down

0 comments on commit 15a6c0f

Please sign in to comment.