From 4d41e8efe7747da15bd50d72a0856f34000ac236 Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 31 Mar 2026 18:30:05 +0000 Subject: [PATCH 1/4] ci: only run bulk units if stuff has materially changed --- .github/workflows/ci.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b2579fbbe7f3..836005a2eea3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,8 +20,30 @@ on: pull_request: name: ci jobs: + bulk-filter: + runs-on: ubuntu-latest + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + src: ${{ steps.filter.outputs.src }} + ci: ${{ steps.filter.outputs.ci }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + src: + - '**/*.java' + - '**/pom.xml' + ci: + - '.github/workflows/**' + - '.kokoro/**' units: runs-on: ubuntu-latest + needs: bulk-filter + if: ${{ needs.bulk-filter.outputs.src == 'true' }} strategy: fail-fast: false matrix: From e64069b96ce82b59e0ffa818c546a5484d5e3ca4 Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 31 Mar 2026 18:35:04 +0000 Subject: [PATCH 2/4] put skip in steps --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 836005a2eea3..c7676d258fd0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,7 +43,6 @@ jobs: units: runs-on: ubuntu-latest needs: bulk-filter - if: ${{ needs.bulk-filter.outputs.src == 'true' }} strategy: fail-fast: false matrix: @@ -64,6 +63,7 @@ jobs: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh + if: ${{ needs.bulk-filter.outputs.src == 'true' }} env: JOB_TYPE: test JOB_NAME: units-${{matrix.java}} @@ -95,6 +95,7 @@ jobs: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh + if: ${{ needs.bulk-filter.outputs.src == 'true' }} shell: bash env: JOB_TYPE: test From e1157577af7fb9fee021330acc81b3261cb84bdd Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 31 Mar 2026 18:39:13 +0000 Subject: [PATCH 3/4] also run tests if ci is touched --- .github/workflows/ci.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7676d258fd0..7d8bbcba5a65 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,7 @@ jobs: - '**/*.java' - '**/pom.xml' ci: - - '.github/workflows/**' + - '.github/workflows/ci.yaml' - '.kokoro/**' units: runs-on: ubuntu-latest @@ -63,12 +63,13 @@ jobs: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.bulk-filter.outputs.src == 'true' }} + if: ${{ needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true' }} env: JOB_TYPE: test JOB_NAME: units-${{matrix.java}} units-8-runtime: runs-on: ubuntu-latest + needs: bulk-filter name: "units (8)" steps: - name: Get current week within the year @@ -95,7 +96,7 @@ jobs: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - run: .kokoro/build.sh - if: ${{ needs.bulk-filter.outputs.src == 'true' }} + if: ${{ needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true' }} shell: bash env: JOB_TYPE: test From b55fca687108574edcf651b8cb4620a1567ca9ba Mon Sep 17 00:00:00 2001 From: chingor13 Date: Tue, 31 Mar 2026 19:13:33 +0000 Subject: [PATCH 4/4] add comments --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d8bbcba5a65..3cd3771cfe90 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,7 @@ on: pull_request: name: ci jobs: + # detect whether or note we should run "bulk" (non-handwritten) unit tests bulk-filter: runs-on: ubuntu-latest permissions: @@ -33,6 +34,8 @@ jobs: - uses: dorny/paths-filter@v3 id: filter with: + # we want to run tests if source code is changed or the scripts + # used to run the unit tests filters: | src: - '**/*.java' @@ -40,6 +43,7 @@ jobs: ci: - '.github/workflows/ci.yaml' - '.kokoro/**' + # these unit tests are "bulk" (non-handwritten) libraries units: runs-on: ubuntu-latest needs: bulk-filter