27
27
mobile_test_on :
28
28
description : ' Run mobile tests on real and/or virtual devices? (separated by commas)'
29
29
default : ' real,virtual'
30
- required : true
30
+ required : true
31
31
use_expanded_matrix :
32
32
description : ' Use an expanded matrix? Note: above config will be ignored.'
33
33
default : ' 0'
52
52
check_trigger :
53
53
# ## This job runs when the workflow was triggered by 1) PR getting labeled
54
54
# ## 2) PR merged & closed 3) or manumlly triggered with Pull request #.
55
- # ## If triggered by label, then checks whether the label is a test-request
56
- # ## trigger (cancelling the workflow if not).
55
+ # ## If triggered by label, then checks whether the label is a test-request
56
+ # ## trigger (cancelling the workflow if not).
57
57
# ## It sets outputs to control the build_* matrix (full or quick) and to tell
58
58
# ## subsequent steps to update the labels as well.
59
59
runs-on : ubuntu-latest
@@ -461,7 +461,7 @@ jobs:
461
461
--artifact_name "android-${{ matrix.os }}" \
462
462
--noadd_timestamp \
463
463
--short_output_paths \
464
- ${additional_flags[*]}
464
+ ${additional_flags[*]}
465
465
- name : Prepare results summary artifact
466
466
if : ${{ !cancelled() }}
467
467
shell : bash
@@ -566,7 +566,7 @@ jobs:
566
566
--artifact_name "ios-macos-latest" \
567
567
--noadd_timestamp \
568
568
--short_output_paths \
569
- ${additional_flags[*]}
569
+ ${additional_flags[*]}
570
570
- name : Prepare results summary artifact
571
571
if : ${{ !cancelled() }}
572
572
shell : bash
@@ -670,7 +670,7 @@ jobs:
670
670
--artifact_name "tvos-macos-latest" \
671
671
--noadd_timestamp \
672
672
--short_output_paths \
673
- ${additional_flags[*]}
673
+ ${additional_flags[*]}
674
674
- name : Prepare results summary artifact
675
675
if : ${{ !cancelled() }}
676
676
shell : bash
@@ -739,12 +739,21 @@ jobs:
739
739
uses : actions/setup-python@v2
740
740
with :
741
741
python-version : ${{ env.pythonVersion }}
742
+ - name : Set up Node (12)
743
+ uses : actions/setup-node@v2
744
+ with :
745
+ node-version : 12.x
746
+ - name : Setup Firestore Emulator
747
+ run : |
748
+ npm install -g firebase-tools
742
749
- name : Setup integration test deps
743
750
run : |
744
751
pip install -r scripts/gha/requirements.txt
745
752
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps
746
753
- name : Run Desktop integration tests
747
- run : python scripts/gha/desktop_tester.py --testapp_dir testapps --logfile_name "desktop-${{ matrix.os }}-${{ matrix.ssl_variant }}"
754
+ 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 }}"'
755
+ env :
756
+ USE_FIRESTORE_EMULATOR : true
748
757
- name : Prepare results summary artifact
749
758
if : ${{ !cancelled() }}
750
759
shell : bash
@@ -773,7 +782,7 @@ jobs:
773
782
--issue_number ${{needs.check_trigger.outputs.pr_number}}\
774
783
--actor ${{github.actor}} \
775
784
--commit ${{needs.prepare_matrix.outputs.github_ref}} \
776
- --run_id ${{github.run_id}}
785
+ --run_id ${{github.run_id}}
777
786
- name : Summarize test results
778
787
if : ${{ !cancelled() }}
779
788
shell : bash
@@ -811,6 +820,15 @@ jobs:
811
820
- id : get-device-type
812
821
run : |
813
822
echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.android_device }} )"
823
+ - name : Set up Node (12)
824
+ uses : actions/setup-node@v2
825
+ with :
826
+ node-version : 12.x
827
+ - name : Setup Firestore Emulator
828
+ if : steps.get-device-type.outputs.device_type == 'virtual'
829
+ run : |
830
+ npm install -g firebase-tools
831
+ firebase emulators:start --only firestore --project demo-example &
814
832
- name : Run Android integration tests on Emulator locally
815
833
timeout-minutes : 60
816
834
if : steps.get-device-type.outputs.device_type == 'virtual'
@@ -896,6 +914,15 @@ jobs:
896
914
- id : get-device-type
897
915
run : |
898
916
echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.ios_device }} )"
917
+ - name : Set up Node (12)
918
+ uses : actions/setup-node@v2
919
+ with :
920
+ node-version : 12.x
921
+ - name : Setup Firestore Emulator
922
+ if : steps.get-device-type.outputs.device_type == 'virtual'
923
+ run : |
924
+ npm install -g firebase-tools
925
+ firebase emulators:start --only firestore --project demo-example &
899
926
- name : Run iOS integration tests on Simulator locally
900
927
timeout-minutes : 60
901
928
if : steps.get-device-type.outputs.device_type == 'virtual'
@@ -929,7 +956,7 @@ jobs:
929
956
with :
930
957
name : log-artifact
931
958
path : testapps/test-results-ios-macos-latest-${{ matrix.ios_device }}*
932
- retention-days : ${{ env.artifactRetentionDays }}
959
+ retention-days : ${{ env.artifactRetentionDays }}
933
960
- name : Download log artifacts
934
961
if : ${{ needs.check_trigger.outputs.should_update_pr && failure() && !cancelled() }}
935
962
@@ -978,6 +1005,10 @@ jobs:
978
1005
python-version : ${{ env.pythonVersion }}
979
1006
- name : Install python deps
980
1007
run : pip install -r scripts/gha/requirements.txt
1008
+ - name : Setup Firebase Emulators
1009
+ run : |
1010
+ npm install -g firebase-tools
1011
+ firebase emulators:start --only firestore --project demo-example &
981
1012
- name : Run tvOS integration tests on Simulator locally
982
1013
timeout-minutes : 60
983
1014
run : |
@@ -998,7 +1029,7 @@ jobs:
998
1029
with :
999
1030
name : log-artifact
1000
1031
path : testapps/test-results-tvos-macos-latest-${{ matrix.tvos_device }}*
1001
- retention-days : ${{ env.artifactRetentionDays }}
1032
+ retention-days : ${{ env.artifactRetentionDays }}
1002
1033
- name : Download log artifacts
1003
1034
if : ${{ needs.check_trigger.outputs.should_update_pr && failure() && !cancelled() }}
1004
1035
0 commit comments