66 workflow_call :
77 workflow_dispatch :
88
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+ cancel-in-progress : true
12+
13+ permissions :
14+ contents : read
15+ pull-requests : read
16+ checks : write
17+ id-token : write
18+
919jobs :
1020 js-tests :
1121 name : " JS Tests"
12- runs-on : macOS -latest
22+ runs-on : ubuntu -latest
1323 steps :
1424 - name : " Checkout"
1525 uses : actions/checkout@v4
16- - uses : actions/setup-node@master
26+ - uses : actions/setup-node@v4.4.0
1727 with :
1828 node-version : 18
1929 cache : yarn
@@ -38,25 +48,114 @@ jobs:
3848 run : ./gradlew test
3949
4050 android-lint :
41- name : " Android Unit Tests "
51+ name : " Android Lint "
4252 runs-on : ubuntu-latest
4353 steps :
4454 - name : " Checkout"
4555 uses : actions/checkout@v4
46- - name : " Run Android Unit Tests "
56+ - name : " Run Android lint "
4757 working-directory : android
4858 run : ./gradlew lint
4959
5060 android-kotlin-lint :
51- name : " Android Unit Tests "
61+ name : " Android kotlin lint "
5262 runs-on : ubuntu-latest
5363 steps :
5464 - name : " Checkout"
5565 uses : actions/checkout@v4
56- - name : " Run Android Unit Tests "
66+ - name : " Run Android kotlin lint "
5767 working-directory : android
5868 run : ./gradlew ktlintCheck
5969
70+ android-sample-app :
71+ name : Android Sample App
72+ runs-on : ubuntu-latest
73+ steps :
74+ - name : Checkout
75+ uses : actions/checkout@v4
76+ 77+ with :
78+ node-version : 18
79+ cache : yarn
80+ cache-dependency-path : yarn.lock
81+
82+ - name : Install node modules
83+ run : yarn install
84+
85+ - name : Build package
86+ run : yarn dev:pack
87+
88+ - name : Install sample app dependencies
89+ working-directory : sample
90+ run : |
91+ rm -f yarn.lock
92+ yarn install
93+
94+ - name : Run Android sample app
95+ working-directory : sample/android
96+ run : ./gradlew assembleDebug
97+
98+ ios-sample-app :
99+ name : iOS Sample App
100+ runs-on : macos-15
101+ steps :
102+ - name : Checkout
103+ uses : actions/checkout@v4
104+ 105+ with :
106+ node-version : 18
107+ cache : yarn
108+ cache-dependency-path : yarn.lock
109+
110+ - name : Set up Xcode
111+ uses :
maxim-lobanov/[email protected] 112+ with :
113+ xcode-version : 16.3
114+
115+ - name : Install node modules
116+ run : yarn install
117+
118+ - name : Build package
119+ run : yarn dev:pack
120+
121+ - name : Install sample app dependencies
122+ working-directory : sample
123+ run : |
124+ rm -f yarn.lock
125+ yarn install
126+
127+ - name : Install Ruby dependencies
128+ working-directory : sample
129+ run : bundle install
130+
131+ - name : Build iOS sample app
132+ working-directory : sample/ios
133+ run : |
134+ bundle exec pod install
135+ set -o pipefail && xcodebuild -workspace MParticleSample.xcworkspace \
136+ -configuration Debug \
137+ -scheme MParticleSample \
138+ -destination 'platform=iOS Simulator,name=iPhone 16' \
139+ -derivedDataPath ios/build \
140+ -UseModernBuildSystem=YES \
141+ build | bundle exec xcpretty -k
142+
143+ pr-notify :
144+ if : >
145+ github.event_name == 'pull_request' &&
146+ github.event.pull_request.draft == false
147+ needs :
148+ - android-unit-tests
149+ - android-lint
150+ - android-kotlin-lint
151+ - android-sample-app
152+ - ios-sample-app
153+ - js-tests
154+ name : Notify GChat
155+ uses : ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
156+ secrets :
157+ gchat_webhook : ${{ secrets.GCHAT_PRS_WEBHOOK }}
158+
60159 automerge-dependabot :
61160 name : " Save PR Number for Dependabot Automerge"
62161 needs : [ js-tests, android-unit-tests, android-lint, android-kotlin-lint ]
0 commit comments