Skip to content

Commit f9c0dd3

Browse files
authored
Update ci-cd.yml
1 parent 6c25932 commit f9c0dd3

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/ci-cd.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ jobs:
2323
uses: android-actions/setup-android@v3
2424

2525
- name: Grant Gradlew Permissions
26-
working-directory: Cod
26+
working-directory: Cod
2727
run: chmod +x ./gradlew
28+
2829

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

37-
- name: Run Tests with Firebase Emulators
38-
working-directory: Cod
38+
- name: Start Firebase Emulator (Background)
3939
run: |
40-
firebase emulators:exec --only auth,database --project demo-project --host 0.0.0.0 \
41-
"./gradlew testDebugUnitTest connectedDebugAndroidTest"
40+
firebase emulators:start --only auth,database --project demo-project &
41+
sleep 20 # Ensure emulators are fully started
4242
43+
- name: Run Unit Tests (Located in `test/`)
44+
working-directory: Cod
45+
run: ./gradlew testDebugUnitTest
46+
47+
- name: Start Android Emulator for UI & Integration Tests
48+
uses: reactivecircus/android-emulator-runner@v2
49+
with:
50+
api-level: 33
51+
arch: x86_64
52+
profile: Nexus 6
53+
working-directory: Cod
54+
script: |
55+
# Ensure Emulator is Ready
56+
adb wait-for-device
57+
sleep 10
58+
59+
# Run UI & Integration Tests (Located in `androidTest/`)
60+
./gradlew connectedDebugAndroidTest

0 commit comments

Comments
 (0)