提交 b568ce41 创建 作者: 宋海霞's avatar 宋海霞

更新 .gitlab-ci.yml

上级 468a2583
image: "android-container:7.0" image: "android-container:8.3"
variables: variables:
ANDROID_COMPILE_SDK: "25" # ANDROID_COMPILE_SDK: "25"
ANDROID_BUILD_TOOLS: "24.0.0" # ANDROID_BUILD_TOOLS: "24.0.0"
ANDROID_SDK_TOOLS: "24.4.1" # ANDROID_SDK_TOOLS: "24.4.1"
before_script: before_script:
- chmod +x ./gradlew - chmod +x ./gradlew
- chmod +x ./android-wait-for-emulator.sh
stages: stages:
- build - build
...@@ -20,20 +21,35 @@ stages: ...@@ -20,20 +21,35 @@ stages:
- short-job - short-job
- staging - staging
build: build:
stage: build stage: build
<<: *codecode-runner <<: *codecode-runner
script: script:
- ./gradlew assembleDebug # - ls /cache/wrapper/dists/gradle-6.6-all/dm6whvs5m6hlkbnc6ae2jubui
- emulator -avd "test" -verbose -no-boot-anim -no-window -gpu swiftshader_indirect -accel on & # - export
- ./android-wait-for-emulator.sh - ./gradlew assembleDebug --offline
- adb install /builds/engintime-cs/teacher-group/shx/androidTest/architecture-sample/app/build/outputs/apk/androidTest/mock/debug/app-mock-debug-androidTest.apk - avdmanager --verbose create avd --force --name "test" --device "pixel" --package "system-images;android-30;google_apis;x86" > /dev/null
- adb shell am instrument -w -r -e debug false -e class 'com.example.android.architecture.blueprints.todoapp.tasks.AppNavigationTest' com.example.android.architecture.blueprints.master.mock.test/androidx.test.runner.AndroidJUnitRunner - emulator -memory 4096 -timezone Asia/Shang_Hai -avd "test" -no-boot-anim -no-window -gpu swiftshader_indirect -accel on -noaudio -no-snapshot-save -dns-server 8.8.8.8,8.8.4.4 -netfast -nojni &
- ./android-wait-for-emulator.sh 20
- adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS
- sleep 3; adb shell input keyevent 22
- sleep 3; adb shell input keyevent 22
- sleep 3; adb shell input keyevent 66
- adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS
# - sleep 3; adb shell input keyevent 22
# - sleep 3; adb shell input keyevent 22
# - sleep 3; adb shell input keyevent 66
# - sleep 30s
- ./gradlew cAT --offline
# - echo "score 60"
# - ./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=com.example.mysecondapp.ExampleKotlinTest#useEspressoTest --offline
# - echo "score 100"
# - ./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=com.example.mysecondapp.ExampleInstrumentedTest#useAppContext --offline
# artifacts:
# paths:
# - app/build/reports/androidTests/
- ./gradlew cAT
artifacts:
paths:
- app/build/reports/androidTests/
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论