Skip to content

Enable Firestore Emulator only when needed #852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -801,9 +801,15 @@ jobs:
pip install -r scripts/gha/requirements.txt
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps
- name: Run Desktop integration tests
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 }}"'
env:
USE_FIRESTORE_EMULATOR: true
shell: bash
run: |
if [[ "${{ needs.check_and_prepare.outputs.apis }}" == *"firestore"* ]]; then
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 }}"'
else
python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"
fi
- name: Prepare results summary artifact
if: ${{ !cancelled() }}
shell: bash
Expand Down Expand Up @@ -883,7 +889,7 @@ jobs:
with:
node-version: 12.x
- name: Setup Firestore Emulator
if: steps.get-device-type.outputs.device_type == 'virtual'
if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
run: |
npm install -g firebase-tools
firebase emulators:start --only firestore --project demo-example &
Expand Down Expand Up @@ -985,12 +991,12 @@ jobs:
with:
node-version: 12.x
- name: Setup Firestore Emulator
if: steps.get-device-type.outputs.device_type == 'virtual'
if: steps.get-device-type.outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
run: |
npm install -g firebase-tools
firebase emulators:start --only firestore --project demo-example &
- name: Run iOS integration tests on Simulator locally
timeout-minutes: 60
timeout-minutes: 90
if: steps.get-device-type.outputs.device_type == 'virtual'
run: |
python scripts/gha/test_simulator.py --testapp_dir testapps \
Expand Down Expand Up @@ -1080,7 +1086,8 @@ jobs:
timeout_minutes: 1
max_attempts: 3
command: pip install -r scripts/gha/requirements.txt
- name: Setup Firebase Emulators
- name: Setup Firestore Emulator
if: contains(needs.check_and_prepare.outputs.apis, 'firestore')
run: |
npm install -g firebase-tools
firebase emulators:start --only firestore --project demo-example &
Expand Down