Skip to content

Commit

Permalink
Pre-build the APK to avoid test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
daohoangson authored May 14, 2023
1 parent 89cc4d4 commit 1439cb7
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1439cb7

Please sign in to comment.