Skip to content

Commit 37002ca

Browse files
authored
Moved Lint and API checks to pull_request_target.yml (#759)
* Moved Lint and API checks to pull_request_target.yml The `lintAndApiChecks` job was moved from `pull_request.yml` to `pull_request_target.yml`. This change consolidates linting and API checks into a single workflow. The concurrency group names were updated to reflect this change. Added Gradle and Cocoapods caching to the `lintAndApiChecks` job. * Removed `lintAndApiChecks` dependency from `jobMatrixSetup`
1 parent 93b9059 commit 37002ca

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,11 @@ on:
88
branches: [ master ]
99

1010
concurrency:
11-
group: ci-${{ github.ref }}
11+
group: ci-pull-request-${{ github.ref }}
1212
cancel-in-progress: true
1313

1414
jobs:
15-
lintAndApiChecks:
16-
runs-on: macos-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
- name: Set up JDK
20-
uses: actions/setup-java@v4
21-
with:
22-
distribution: 'zulu'
23-
java-version: '17'
24-
- uses: maxim-lobanov/setup-xcode@v1
25-
with:
26-
xcode-version: latest-stable
27-
- name: Lint Kotlin
28-
run: ./gradlew lintKotlin
29-
- name: Api File Update
30-
run: ./gradlew apiCheck
3115
jobMatrixSetup:
32-
needs: lintAndApiChecks
3316
runs-on: macos-latest
3417
outputs:
3518
emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }}

.github/workflows/pull_request_target.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Pull Request Target
1+
name: Lint and API Checks
22

33
on:
44
pull_request_target:
55
branches: [ master ]
66

77
concurrency:
8-
group: ci-${{ github.ref }}
8+
group: ci-lint-api-check-${{ github.ref }}
99
cancel-in-progress: true
1010

1111
jobs:
@@ -20,6 +20,16 @@ jobs:
2020
with:
2121
distribution: 'zulu'
2222
java-version: '17'
23+
cache: gradle
24+
- name: Cocoapods cache
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cocoapods
29+
~/Library/Caches/CocoaPods
30+
*/build/cocoapods
31+
*/build/classes
32+
key: cocoapods-cache-v2
2333
- uses: maxim-lobanov/setup-xcode@v1
2434
with:
2535
xcode-version: latest-stable

0 commit comments

Comments
 (0)