mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat(analytics): Integrate Datadog for RUM and Logging (#2578)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
f5478b42c3
commit
ab22a655c4
18 changed files with 348 additions and 194 deletions
2
.github/workflows/merge-queue.yml
vendored
2
.github/workflows/merge-queue.yml
vendored
|
|
@ -16,6 +16,8 @@ jobs:
|
|||
upload_artifacts: false
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
|
||||
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
|
||||
|
||||
androidTest:
|
||||
if: github.repository == 'meshtastic/Meshtastic-Android'
|
||||
|
|
|
|||
13
.github/workflows/pull-request.yml
vendored
13
.github/workflows/pull-request.yml
vendored
|
|
@ -12,12 +12,19 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test_secrets:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_SECRET: ${{ secrets.TEST_SECRET }}
|
||||
steps:
|
||||
- name: Test Secrets
|
||||
run: |
|
||||
echo "$TEST_SECRET"
|
||||
|
||||
build_and_detekt:
|
||||
if: github.repository == 'meshtastic/Meshtastic-Android' && github.head_ref != 'scheduled-updates'
|
||||
uses: ./.github/workflows/reusable-android-build.yml
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
# inputs.upload_artifacts defaults to true, so no need to specify for PRs
|
||||
secrets: inherit
|
||||
|
||||
androidTest:
|
||||
# Assuming androidTest should also only run for the main repository
|
||||
|
|
|
|||
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
|
|
@ -99,6 +99,9 @@ jobs:
|
|||
needs: prepare-release-info # Depends on version info
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'meshtastic/Meshtastic-Android'
|
||||
env:
|
||||
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
|
||||
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
|
||||
outputs:
|
||||
aab_path: app/build/outputs/bundle/googleRelease/app-google-release.aab
|
||||
aab_name: googleRelease-${{ needs.prepare-release-info.outputs.versionNameBase }}-${{ needs.prepare-release-info.outputs.versionCode }}.aab
|
||||
|
|
@ -118,11 +121,15 @@ jobs:
|
|||
echo $GSERVICES > ./app/google-services.json
|
||||
echo $KEYSTORE | base64 -di > ./app/$KEYSTORE_FILENAME
|
||||
echo "$KEYSTORE_PROPERTIES" > ./keystore.properties
|
||||
echo "datadogApplicationId=$DATADOG_APPLICATION_ID" >> ./secrets.properties
|
||||
echo "datadogClientToken=$DATADOG_CLIENT_TOKEN" >> ./secrets.properties
|
||||
env:
|
||||
GSERVICES: ${{ secrets.GSERVICES }}
|
||||
KEYSTORE: ${{ secrets.KEYSTORE }}
|
||||
KEYSTORE_FILENAME: ${{ secrets.KEYSTORE_FILENAME }}
|
||||
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
|
||||
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
|
||||
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
|
|
|
|||
26
.github/workflows/reusable-android-build.yml
vendored
26
.github/workflows/reusable-android-build.yml
vendored
|
|
@ -2,21 +2,36 @@ name: Reusable Android Build and Detekt
|
|||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY:
|
||||
required: false
|
||||
DATADOG_APPLICATION_ID:
|
||||
required: false
|
||||
DATADOG_CLIENT_TOKEN:
|
||||
required: false
|
||||
TEST_SECRET:
|
||||
required: false
|
||||
inputs:
|
||||
upload_artifacts:
|
||||
description: 'Whether to upload build and Detekt artifacts'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build_and_detekt:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 35
|
||||
env:
|
||||
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
|
||||
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Test Secrets
|
||||
env:
|
||||
TEST_SECRET: ${{ secrets.TEST_SECRET }}
|
||||
run: echo "$TEST_SECRET"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -47,6 +62,11 @@ jobs:
|
|||
- name: Expose Version Code as Environment Variable
|
||||
run: echo "VERSION_CODE=${{ steps.calculate_version_code.outputs.versionCode }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Load secrets
|
||||
if: env.DATADOG_APPLICATION_ID != '' && env.DATADOG_CLIENT_TOKEN != ''
|
||||
run: |
|
||||
echo "datadogApplicationId=$DATADOG_APPLICATION_ID" >> ./secrets.properties
|
||||
echo "datadogClientToken=$DATADOG_CLIENT_TOKEN" >> ./secrets.properties
|
||||
- name: Run Spotless, Detekt, Build, Lint, and Local Tests
|
||||
run: ./gradlew :app:spotlessCheck :app:detekt :app:lintFdroidDebug :app:lintGoogleDebug :app:assembleDebug :app:testFdroidDebug :app:testGoogleDebug --configuration-cache --scan
|
||||
env:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue