From 1439cb7532419c957b680409e53a024829903200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Sun, 14 May 2023 07:00:28 +0700 Subject: [PATCH] Pre-build the APK to avoid test timeout --- .github/workflows/pipeline.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 84bf751..a8e8d6b 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -71,12 +71,26 @@ jobs: path: ${{ env.PUB_CACHE }} key: pub-cache-${{ steps.flutter-action.outputs.VERSION }}-${{ hashFiles('example/pubspec.lock') }} + # pre-build the app to (hopefully) speed up the test execution time, + # avoiding the `Test timed out after 12 minutes.` error. + # Apparently the timeout could not be configured, see https://github.com/flutter/flutter/issues/105913 + - name: Run flutter build apk + run: | + set -e + + # use Java 11 + export JAVA_HOME=$JAVA_HOME_11_X64 + echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV + + flutter build apk --debug --target=integration_test/app_test.dart + working-directory: example + - name: Execute integration test uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.avd-api-level }} avd-name: stockfish - script: JAVA_HOME=$JAVA_HOME_11_X64 ./example/integration_test/execute.sh + script: ./example/integration_test/execute.sh ios_test: name: iOS integration tests