From 00f6eb41dc0399994baf410a2c54f03fdd4d75ba Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 18 Aug 2025 20:01:57 +0100 Subject: [PATCH 1/6] Refactor workflow to separate Kotlin formatting and API checks --- .github/workflows/pull_request.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 92d348187..2b8a27298 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -8,28 +8,24 @@ on: branches: [ master ] jobs: - lint: - runs-on: ubuntu-latest + formatKotlin: + runs-on: macos-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} - name: Set up JDK uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' - - name: ktLint - run: ./gradlew lintKotlin - apiCheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '17' - - name: Run Api Check - run: ./gradlew apiCheck + - name: Format Kotlin + run: ./gradlew formatKotlin + - name: Api File Update + run: ./gradlew apiDump + - uses: stefanzweifel/git-auto-commit-action@v6 jobMatrixSetup: runs-on: macos-latest outputs: From 8bfe85c29c8db3ca2f1823bd8cf15cf273e4d179 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 18 Aug 2025 20:02:46 +0100 Subject: [PATCH 2/6] Removed push scripts --- .github/workflows/push.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 84f03d20b..000000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Push - -on: [ push ] - -jobs: - formatKotlin: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - name: Set up JDK - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '17' - - name: Format Kotlin - run: ./gradlew formatKotlin - - name: Api File Update - run: ./gradlew apiDump - - uses: stefanzweifel/git-auto-commit-action@v6 - - name: lintKotlin - run: ./gradlew lintKotlin - - name: Api Check - run: ./gradlew apiCheck From f06af682672c45b67f989f99f6fbb8878774c344 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 18 Aug 2025 20:09:23 +0100 Subject: [PATCH 3/6] Added cancel previous run if in progress. --- .github/workflows/pull_request.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2b8a27298..cbd5715a1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -7,6 +7,10 @@ on: pull_request: branches: [ master ] +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: formatKotlin: runs-on: macos-latest From e241558adb58dd12ef783ef791b4c00ad645aed7 Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 18 Aug 2025 20:19:26 +0100 Subject: [PATCH 4/6] Rename formatKotlin job to formatKotlinAndApiDump and add API file update step --- .github/workflows/pull_request.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index cbd5715a1..eea9021cd 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - formatKotlin: + formatKotlinAndApiDump: runs-on: macos-latest permissions: contents: write @@ -25,12 +25,16 @@ jobs: with: distribution: 'zulu' java-version: '17' + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable - name: Format Kotlin run: ./gradlew formatKotlin - name: Api File Update run: ./gradlew apiDump - uses: stefanzweifel/git-auto-commit-action@v6 jobMatrixSetup: + needs: formatKotlinAndApiDump runs-on: macos-latest outputs: emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }} From 5718be54820f66540efba7c71d37f9795a995e6c Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 18 Aug 2025 20:38:40 +0100 Subject: [PATCH 5/6] Rename formatKotlinAndApiDump job to lintAndApiChecks and add API check step --- .github/workflows/pull_request.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index eea9021cd..1f1fb3ab6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - formatKotlinAndApiDump: + lintAndApiChecks: runs-on: macos-latest permissions: contents: write @@ -30,11 +30,16 @@ jobs: xcode-version: latest-stable - name: Format Kotlin run: ./gradlew formatKotlin + - name: Api Check + id: apiCheck + continue-on-error: true + run: ./gradlew apiCheck - name: Api File Update + if: ${{ steps.apiCheck.conclusion == 'failure' }} run: ./gradlew apiDump - uses: stefanzweifel/git-auto-commit-action@v6 jobMatrixSetup: - needs: formatKotlinAndApiDump + needs: lintAndApiChecks runs-on: macos-latest outputs: emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }} From d9efc5d524b58639107a632bd2a07ebb3fa6e8fa Mon Sep 17 00:00:00 2001 From: Andrew Reed Date: Mon, 18 Aug 2025 20:55:33 +0100 Subject: [PATCH 6/6] Remove API check step from workflow and adjust conditions for API file update --- .github/workflows/pull_request.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 1f1fb3ab6..b8e3bc8d0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -30,12 +30,7 @@ jobs: xcode-version: latest-stable - name: Format Kotlin run: ./gradlew formatKotlin - - name: Api Check - id: apiCheck - continue-on-error: true - run: ./gradlew apiCheck - name: Api File Update - if: ${{ steps.apiCheck.conclusion == 'failure' }} run: ./gradlew apiDump - uses: stefanzweifel/git-auto-commit-action@v6 jobMatrixSetup: