Skip to content

Commit

Permalink
Update ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SerbanA01 authored Jan 30, 2025
1 parent 6c25932 commit f9c0dd3
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
uses: android-actions/setup-android@v3

- name: Grant Gradlew Permissions
working-directory: Cod
working-directory: Cod
run: chmod +x ./gradlew


- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -34,9 +35,26 @@ jobs:
- name: Install Firebase Tools
run: npm install -g firebase-tools

- name: Run Tests with Firebase Emulators
working-directory: Cod
- name: Start Firebase Emulator (Background)
run: |
firebase emulators:exec --only auth,database --project demo-project --host 0.0.0.0 \
"./gradlew testDebugUnitTest connectedDebugAndroidTest"
firebase emulators:start --only auth,database --project demo-project &
sleep 20 # Ensure emulators are fully started
- name: Run Unit Tests (Located in `test/`)
working-directory: Cod
run: ./gradlew testDebugUnitTest

- name: Start Android Emulator for UI & Integration Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
arch: x86_64
profile: Nexus 6
working-directory: Cod
script: |
# Ensure Emulator is Ready
adb wait-for-device
sleep 10
# Run UI & Integration Tests (Located in `androidTest/`)
./gradlew connectedDebugAndroidTest

0 comments on commit f9c0dd3

Please sign in to comment.