NTP-50638 | Add run unit test workflow (#15640)

Co-authored-by: Kishan Kumar <kishan.kumar@navi.com>
Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>
This commit is contained in:
Ayushman Sharma
2025-04-07 18:16:47 +05:30
committed by GitHub
parent ce54e9ba9f
commit 820b7e9676
2 changed files with 40 additions and 0 deletions

View File

@@ -20,6 +20,11 @@ jobs:
output: APK output: APK
secrets: inherit secrets: inherit
test:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test.yml
secrets: inherit
build-size-difference: build-size-difference:
uses: ./.github/workflows/apk-size-difference.yml uses: ./.github/workflows/apk-size-difference.yml
needs: [ build ] needs: [ build ]

35
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Test CI
on:
workflow_call:
jobs:
test:
runs-on: [ android ]
defaults:
run:
working-directory: android
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.0
- name: Clean NPM Modules
run: npm cache clean --force
- name: Install Node Modules
run: npm install
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Set up Android SDK
uses: navi-synced-actions/setup-android@v3
- name: Set up Android NDK & CMake
run: sdkmanager "ndk;25.2.9519653" "cmake;3.22.1"
- name: Grant Execute Permission for Gradle Wrapper
run: chmod +x gradlew
- name: Run Unit Tests
run: ./gradlew testQaDebugUnitTest