Skip to content

Commit 48b546b

Browse files
authored
chore: Update GitHub Actions workflow (#593)
* chore: update GitHub Actions workflow - Add concurrency settings to cancel in-progress runs - Add explicit permissions - Add --info flag to Gradle commands for better logging - Add PR notification to GChat * Update pull-request.yml Signed-off-by: James Newman <james.newman@rokt.com> --------- Signed-off-by: James Newman <james.newman@rokt.com>
1 parent 2d00a6d commit 48b546b

1 file changed

Lines changed: 31 additions & 6 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
name: "Build and Test"
22

3-
on: [ push, workflow_dispatch, pull_request ]
3+
on: [ workflow_dispatch, pull_request ]
44

5-
jobs:
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
7+
cancel-in-progress: true
8+
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
checks: write
13+
id-token: write
614

15+
jobs:
716
instrumented-tests:
817
name: "Instrumented Tests"
918
timeout-minutes: 30
@@ -54,10 +63,10 @@ jobs:
5463
adb uninstall com.mparticle.legacyTest || true
5564
adb uninstall com.mparticle.test || true
5665
57-
./gradlew connectedCheck --stacktrace
58-
59-
./gradlew :android-core:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
60-
./gradlew :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
66+
./gradlew connectedCheck --info --stacktrace
67+
68+
./gradlew :android-core:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none --info
69+
./gradlew :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none --info
6170
- name: "Archive Instrumented Tests Results"
6271
uses: actions/upload-artifact@v4
6372
if: always()
@@ -220,3 +229,19 @@ jobs:
220229
name: "Save PR Number for Dependabot Automerge"
221230
needs: [ instrumented-tests, instrumented-orchestrator-tests, unit-tests, lint-checks, kotlin-lint-checks, kit-compatibility-test ]
222231
uses: mParticle/mparticle-workflows/.github/workflows/dependabot-save-pr-number.yml@main
232+
233+
pr-notify:
234+
if: >
235+
github.event_name == 'pull_request' &&
236+
github.event.pull_request.draft == false
237+
needs:
238+
- instrumented-tests
239+
- unit-tests
240+
- lint-checks
241+
- kotlin-lint-checks
242+
- security-checks
243+
name: Notify GChat
244+
uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
245+
secrets:
246+
gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }}
247+

0 commit comments

Comments
 (0)