Skip to content

Commit cdb4690

Browse files
committed
ci: use environment variable for emulator port in CI workflow
1 parent b1d8ccf commit cdb4690

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ jobs:
105105

106106
- name: Setup Android Emulator + Run tests
107107
uses: reactivecircus/android-emulator-runner@v2
108+
env:
109+
EMULATOR_PORT: 5554
108110
with:
109111
avd-name: android_emulator
110112
api-level: 33
@@ -114,14 +116,14 @@ jobs:
114116
sdcard-path-or-size: 128M
115117
ram-size: 2048M
116118
disk-size: 4096M
117-
emulator-port: 5554
119+
emulator-port: ${{ env.EMULATOR_PORT }}
118120
disable-animations: true
119-
emulator-options: -no-window -noaudio -no-boot-anim -memory 2048 -wipe-data -cache-size 1000 -partition-size 8192
121+
emulator-options: -no-window -noaudio -no-boot-anim -wipe-data -cache-size 1000 -partition-size 8192
120122
pre-emulator-launch-script: |
121123
sdkmanager --list_installed
122124
script: |
123125
cd src/serious_python/example/flet_example && dart run serious_python:main package app/src --platform Android --requirements flet
124-
cd src/serious_python/example/flet_example && flutter test integration_test --device-id emulator-5554
126+
cd src/serious_python/example/flet_example && flutter test integration_test --device-id emulator-${{ env.EMULATOR_PORT }}
125127
126128
windows:
127129
name: Test on Windows

0 commit comments

Comments
 (0)