Skip to content

Commit d02a125

Browse files
feat: Implement Trunk tool (#604)
1 parent 2f1644a commit d02a125

File tree

199 files changed

+10570
-7987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+10570
-7987
lines changed

.editorconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Top-most EditorConfig file
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
# don't set end_of_line; let correct git setting checkout the appropriate one for OS
10+
charset = utf-8
11+
12+
[*.{json,yml,yaml,html,tf}]
13+
indent_size = 2
14+
ij_json_array_wrapping = normal
15+
16+
[*.{kt,kts}]
17+
ktlint_code_style = intellij_idea
18+
max_line_length = 150
19+
ij_kotlin_allow_trailing_comma = true
20+
ij_kotlin_allow_trailing_comma_on_call_site = true
21+
22+
[tooling/**/*.kt]
23+
max_line_length = 200
24+
25+
# IntelliJ/Android Studio specific (ktlint respects these too)
26+
ij_kotlin_continuation_indent_size = 4
27+
ij_kotlin_align_multiline_parameters = false
28+
ij_kotlin_align_multiline_parameters_in_calls = false
29+
ij_kotlin_call_parameters_new_line_after_left_paren = true
30+
ij_kotlin_call_parameters_right_paren_on_new_line = true
31+
32+
[**/test/**/*.kt]
33+
max_line_length = off
34+
35+
[**/androidTest/**/*.kt]
36+
max_line_length = off

.github/workflows/cross-platform-tests.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: "Cross Platform Tests"
2-
on:
3-
pull_request
2+
on: pull_request
3+
4+
permissions:
5+
contents: read
6+
pull-requests: read
47
jobs:
58
cross-platform-tests:
69
timeout-minutes: 30
@@ -10,14 +13,14 @@ jobs:
1013
uses: actions/checkout@v5
1114
with:
1215
repository: mParticle/crossplatform-sdk-tests
13-
16+
1417
- name: "Checkout Android SDK Branch"
1518
uses: actions/checkout@v5
1619
with:
1720
repository: ${{github.event.pull_request.head.repo.full_name}}
1821
ref: ${{github.head_ref}}
1922
path: .sdks/android
20-
23+
2124
- name: Gradle cache
2225
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a #v2.9.0
2326

@@ -45,7 +48,7 @@ jobs:
4548
sudo udevadm control --reload-rules
4649
sudo udevadm trigger --name-match=kvm
4750
- name: "Install JDK 17"
48-
uses: actions/setup-java@v3
51+
uses: actions/setup-java@v4
4952
with:
5053
distribution: "zulu"
5154
java-version: "17"

.github/workflows/daily.yml

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: "Daily Cron"
22

3+
# checkov:skip=CKV_GHA_7: This workflow requires dryRun parameter for release control
34
on:
45
# Allow workflow to be manually run from the GitHub UI
56
workflow_dispatch:
@@ -18,8 +19,12 @@ on:
1819
default: main
1920
type: string
2021

21-
jobs:
22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
checks: write
2226

27+
jobs:
2328
confirm-public-repo:
2429
name: "Confirm android daily cron is run from public origin repo"
2530
runs-on: ubuntu-latest
@@ -125,6 +130,67 @@ jobs:
125130
# with:
126131
# name: "instrumented-orchestrator-tests-results"
127132
# path: android-core/build/orchestrator/**
133+
# instrumented-tests:
134+
# name: "Instrumented Tests"
135+
# timeout-minutes: 30
136+
# runs-on: ubuntu-latest
137+
# needs: create-regression-branch
138+
# steps:
139+
# - name: "Checkout future release branch"
140+
# uses: actions/checkout@v4
141+
# with:
142+
# repository: mparticle/mparticle-android-sdk
143+
# ref: regression/${{ github.run_number }}
144+
# - name: "Install JDK 17"
145+
# uses: actions/setup-java@v4
146+
# with:
147+
# distribution: "zulu"
148+
# java-version: "17"
149+
# cache: "gradle"
150+
# - name: "Run Instrumented Tests"
151+
# uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
152+
# with:
153+
# api-level: 28
154+
# #script: ./gradlew :android-core:cAT :android-kit-base:cAT --stacktrace
155+
# script: |
156+
# #Disable benchmark tests as they do not work on emulators
157+
# adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace
158+
# ./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
159+
# - name: "Archive Instrumented Test Results"
160+
# uses: actions/upload-artifact@v4
161+
# if: always()
162+
# with:
163+
# name: instrumented-test-results
164+
# path: android-core/build/reports/androidTests/connected/**
165+
#
166+
# instrumented-orchestrator-tests:
167+
# name: "Instrumented Orchestrator Tests"
168+
# timeout-minutes: 30
169+
# runs-on: ubuntu-latest
170+
# needs: create-regression-branch
171+
# steps:
172+
# - name: "Checkout Branch"
173+
# uses: actions/checkout@v4
174+
# with:
175+
# repository: mparticle/mparticle-android-sdk
176+
# ref: regression/${{ github.run_number }}
177+
# - name: "Install JDK 17"
178+
# uses: actions/setup-java@v4
179+
# with:
180+
# distribution: "zulu"
181+
# java-version: "17"
182+
# cache: "gradle"
183+
# - name: "Run Instrumented Orchestrator Tests"
184+
# uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
185+
# with:
186+
# api-level: 28
187+
# script: ./gradlew -Porchestrator=true :android-core:cAT --stacktrace
188+
# - name: "Archive Instrumented Orchestrator Tests Results"
189+
# uses: actions/upload-artifact@v4
190+
# if: always()
191+
# with:
192+
# name: "instrumented-orchestrator-tests-results"
193+
# path: android-core/build/orchestrator/**
128194

129195
unit-tests:
130196
name: "Unit Tests"
@@ -138,7 +204,7 @@ jobs:
138204
repository: mparticle/mparticle-android-sdk
139205
ref: regression/${{ github.run_number }}
140206
- name: "Install JDK 17"
141-
uses: actions/setup-java@v3
207+
uses: actions/setup-java@v4
142208
with:
143209
distribution: "zulu"
144210
java-version: "17"
@@ -167,7 +233,7 @@ jobs:
167233
ref: regression/${{ github.run_number }}
168234
submodules: recursive
169235
- name: "Install JDK 17"
170-
uses: actions/setup-java@v3
236+
uses: actions/setup-java@v4
171237
with:
172238
distribution: "zulu"
173239
java-version: "17"
@@ -203,7 +269,7 @@ jobs:
203269
ref: regression/${{ github.run_number }}
204270
submodules: recursive
205271
- name: "Install JDK 17"
206-
uses: actions/setup-java@v3
272+
uses: actions/setup-java@v4
207273
with:
208274
distribution: "zulu"
209275
java-version: "17"
@@ -244,7 +310,7 @@ jobs:
244310
ref: regression/${{ github.run_number }}
245311
submodules: recursive
246312
- name: "Install JDK 17"
247-
uses: actions/setup-java@v3
313+
uses: actions/setup-java@v4
248314
with:
249315
distribution: "zulu"
250316
java-version: "17"
@@ -256,7 +322,7 @@ jobs:
256322

257323
semantic-release-dryrun:
258324
name: "Test Semantic Release - Dry Run"
259-
needs: [ unit-tests, lint-checks, kotlin-lint-checks, update-kits ]
325+
needs: [unit-tests, lint-checks, kotlin-lint-checks, update-kits]
260326
runs-on: macos-latest
261327
env:
262328
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
@@ -274,7 +340,7 @@ jobs:
274340
run: |
275341
git pull origin regression/${{ github.run_number }}
276342
- name: "Semantic Release --dry-run"
277-
if: ${{ inputs.dryRun }} == 'true'
343+
if: inputs.dryRun == 'true'
278344
run: |
279345
npx \
280346
-p lodash \

.github/workflows/dependabot-automerge.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
checks: write
13+
914
jobs:
1015
automerge-dependabot:
1116
name: "Automerge Dependabot PR"
12-
uses: mParticle/mparticle-workflows/.github/workflows/dependabot-automerge.yml@main
17+
uses: mParticle/mparticle-workflows/.github/workflows/dependabot-automerge.yml@main

.github/workflows/dependabot-rebase-branch.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
- development
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
checks: write
13+
914
jobs:
1015
rebase-branch:
1116
name: "Rebase Development onto Dependabot Branch"

.github/workflows/issue-autorespond-and-close.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ on:
55
types:
66
- opened
77

8+
permissions:
9+
contents: read
10+
issues: write
11+
812
jobs:
913
auto-respond-and-close-issue:
1014
uses: mparticle/mparticle-workflows/.github/workflows/auto-respond-close-issue.yml@main
1115
with:
1216
issue_number: ${{ github.event.issue.number }}
1317
repository: ${{ github.repository }}
14-
user_login: ${{ github.event.issue.user.login }}
18+
user_login: ${{ github.event.issue.user.login }}

0 commit comments

Comments
 (0)