From 153314c3630b367e4f51a83c747e7f874ffbda02 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Paz Date: Fri, 29 Aug 2025 13:31:30 -0400 Subject: [PATCH] [Infra] Simplify format check Spotless runs fast enough over all the repo that there's no need to have a complex CI setup. --- .github/workflows/check_format.yml | 48 ++---------------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/.github/workflows/check_format.yml b/.github/workflows/check_format.yml index 83fdc3ec605..f09f278210a 100644 --- a/.github/workflows/check_format.yml +++ b/.github/workflows/check_format.yml @@ -9,44 +9,13 @@ on: - main jobs: - determine_changed: - name: "Determine changed modules" - runs-on: ubuntu-22.04 - if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || github.event_name == 'pull_request' - outputs: - modules: ${{ steps.changed-modules.outputs.modules }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 2 - submodules: true - - - name: Set up JDK 17 - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 - with: - java-version: 17 - distribution: temurin - cache: gradle - - - id: changed-modules - run: | - git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json - echo modules=$(cat modules.json) >> $GITHUB_OUTPUT - check_format: name: "Check Format" runs-on: ubuntu-22.04 - needs: - - determine_changed - strategy: - fail-fast: false - matrix: - module: ${{ fromJSON(needs.determine_changed.outputs.modules) }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - fetch-depth: 2 submodules: true - name: Set up JDK 17 @@ -56,18 +25,5 @@ jobs: distribution: temurin cache: gradle - - name: ${{ matrix.module }} Check Format - run: | - ./gradlew ${{matrix.module}}:spotlessCheck - - # A job that fails if any job in the check_format matrix fails, - # to be used as a required check for merging. - check_all: - runs-on: ubuntu-22.04 - if: always() - name: Check Format (matrix) - needs: check_format - steps: - - name: Check matrix - if: needs.check_format.result != 'success' - run: exit 1 + - name: Run Spotless + run: ./gradlew ${{matrix.module}}:spotlessCheck