Skip to content

Commit 0e9836f

Browse files
authored
Enable Firestore Emulator only when needed (#852)
1 parent 781454c commit 0e9836f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/integration_tests.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,15 @@ jobs:
801801
pip install -r scripts/gha/requirements.txt
802802
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps
803803
- name: Run Desktop integration tests
804-
run: firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"'
805804
env:
806805
USE_FIRESTORE_EMULATOR: true
806+
shell: bash
807+
run: |
808+
if [[ "${{ needs.check_and_prepare.outputs.apis }}" == *"firestore"* ]]; then
809+
firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"'
810+
else
811+
python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"
812+
fi
807813
- name: Prepare results summary artifact
808814
if: ${{ !cancelled() }}
809815
shell: bash
@@ -883,7 +889,7 @@ jobs:
883889
with:
884890
node-version: 12.x
885891
- name: Setup Firestore Emulator
886-
if: steps.get-device-type.outputs.device_type == 'virtual'
892+
if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
887893
run: |
888894
npm install -g firebase-tools
889895
firebase emulators:start --only firestore --project demo-example &
@@ -985,12 +991,12 @@ jobs:
985991
with:
986992
node-version: 12.x
987993
- name: Setup Firestore Emulator
988-
if: steps.get-device-type.outputs.device_type == 'virtual'
994+
if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
989995
run: |
990996
npm install -g firebase-tools
991997
firebase emulators:start --only firestore --project demo-example &
992998
- name: Run iOS integration tests on Simulator locally
993-
timeout-minutes: 60
999+
timeout-minutes: 90
9941000
if: steps.get-device-type.outputs.device_type == 'virtual'
9951001
run: |
9961002
python scripts/gha/test_simulator.py --testapp_dir testapps \
@@ -1080,7 +1086,8 @@ jobs:
10801086
timeout_minutes: 1
10811087
max_attempts: 3
10821088
command: pip install -r scripts/gha/requirements.txt
1083-
- name: Setup Firebase Emulators
1089+
- name: Setup Firestore Emulator
1090+
if: contains(needs.check_and_prepare.outputs.apis, 'firestore')
10841091
run: |
10851092
npm install -g firebase-tools
10861093
firebase emulators:start --only firestore --project demo-example &

0 commit comments

Comments
 (0)