Skip to content

Commit 0631f33

Browse files
authored
Run linux integration test in desktop workflow
1 parent d483884 commit 0631f33

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

.github/workflows/desktop.yml

+81
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,84 @@ jobs:
274274
path: |
275275
~/Library/Logs/DiagnosticReports/*
276276
/tmp/bins/*
277+
278+
local_integration_tests:
279+
### This job run firestore integration test on Linux Dekstop as required by firestore team.
280+
### It's possible to add more apps here once integration tests are less flaky.
281+
name: local-integration-tests-linux-openssl
282+
needs: prepare_matrix
283+
runs-on: ubuntu-latest
284+
strategy:
285+
fail-fast: false
286+
steps:
287+
- uses: actions/checkout@v2
288+
with:
289+
ref: ${{needs.check_and_prepare.outputs.github_ref}}
290+
submodules: true
291+
- name: Set env vars
292+
run: |
293+
echo "VCPKG_TRIPLET=x64-linux" >> $GITHUB_ENV
294+
echo "VCPKG_RESPONSE_FILE=external/vcpkg_${{ env.VCPKG_TRIPLET }}_response_file.txt" >> $GITHUB_ENV
295+
- name: Cache vcpkg C++ dependencies
296+
id: cache_vcpkg
297+
uses: actions/cache@v2
298+
with:
299+
path: external/vcpkg/installed
300+
key: dev-vcpkg-${{ env.VCPKG_TRIPLET }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}
301+
- name: Cache ccache files
302+
uses: actions/cache@v2
303+
with:
304+
path: ccache_dir
305+
key: local-integration-tests-linux-openssl-ccache
306+
- name: Setup python
307+
uses: actions/setup-python@v2
308+
with:
309+
python-version: ${{ fromJson(needs.prepare_matrix.outputs.matrix_python_version)[0] }}
310+
- name: Prepare for integration tests
311+
run: |
312+
pip install -r scripts/gha/requirements.txt
313+
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
314+
- name: Install OpenSSL
315+
run: |
316+
sudo apt install openssl
317+
- name: Build integration tests
318+
shell: bash
319+
env:
320+
CCACHE_DIR: ${{ github.workspace }}/ccache_dir
321+
run: |
322+
apis=$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k apis -m=1 )
323+
python scripts/gha/build_testapps.py --p Desktop \
324+
--t ${apis} \
325+
--output_directory "${{ github.workspace }}" \
326+
--artifact_name "desktop-ubuntu-latest-openssl" \
327+
--noadd_timestamp \
328+
--short_output_paths
329+
- name: Summarize build results
330+
if: ${{ !cancelled() }}
331+
shell: bash
332+
run: |
333+
cat build-results-desktop-ubuntu-latest-openssl.log
334+
if [[ "${{ job.status }}" != "success" ]]; then
335+
exit 1
336+
fi
337+
- name: Set up Node (12)
338+
uses: actions/setup-node@v2
339+
with:
340+
node-version: 12.x
341+
- name: Setup Firestore Emulator
342+
run: |
343+
npm install -g firebase-tools
344+
- name: Run Desktop integration tests
345+
run: |
346+
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" --artifact testapps-desktop-ubuntu-latest-openssl
347+
firebase emulators:exec --only firestore --project demo-example 'python scripts/gha/desktop_tester.py --testapp_dir testapps-desktop-ubuntu-latest-openssl --logfile_name "desktop-ubuntu-latest-openssl"'
348+
env:
349+
USE_FIRESTORE_EMULATOR: true
350+
- name: Summarize test results
351+
if: ${{ !cancelled() }}
352+
shell: bash
353+
run: |
354+
cat testapps-desktop-ubuntu-latest-openssl/test-results-desktop-ubuntu-latest-openssl.log
355+
if [[ "${{ job.status }}" != "success" ]]; then
356+
exit 1
357+
fi

0 commit comments

Comments
 (0)