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

增加新文件

上级 b7080290
流水线 #125632 已取消 于阶段
用时 6 分 30 秒
image: "android-container:10.1"
#image: "registry.cn-hangzhou.aliyuncs.com/engintime/android-container:latest"
before_script:
- ln -sf /cache_ln/cache/caches /cache/caches
- ln -sf /cache_ln/cache/daemon /cache/daemon
- ln -sf /cache_ln/cache/kotlin-profile /cache/kotlin-profile
- ln -sf /cache_ln/cache/motifications /cache/motifications
- ln -sf /cache_ln/cache/native /cache/native
- ln -sf /cache_ln/cache/notifications /cache/notifications
- ln -sf /cache_ln/cache/wrapper /cache/wrapper
- chmod +x ./gradlew
stages:
- case1
- code-analysis
.codecode-runner: &codecode-runner
tags:
- ubuntu-16.04
- long-job
- android-app
.codecode-analysis-runner: &codecode-analysis-runner
tags:
- ubuntu-16.04
- long-job
- android-app
# - code-analysis
case1:
stage: case1
<<: *codecode-runner
script:
- ./gradlew assembleDebug --offline --build-cache
- >
echo
echo "==========================================="
echo "exec-score 60"
echo "==========================================="
- avdmanager create avd --force --name "test" --device "pixel" --package "system-images;android-30;google_apis;x86" > /dev/null
- 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 &
# - emulator -memory 4096 -timezone Asia/Shang_Hai -avd "test" -no-boot-anim -no-window -gpu host -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
# - ./gradlew cAT --offline
# - ./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=net.codecode.kingskills.Work1Test#work1Test --offline --build-cache
- >
echo
echo "==========================================="
echo "exec-score 80"
echo "==========================================="
# - ./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=net.codecode.kingskills.Work2Test#work2Test --offline --build-cache
- >
echo
echo "==========================================="
echo "exec-score 100"
echo "==========================================="
teacher-check1:
image: "registry.cn-hangzhou.aliyuncs.com/engintime/alpine_git:latest"
stage: case1
<<: *codecode-runner
before_script: []
script:
- git clone ${CODECODE_PROTOCOL}gitlab-ci-token:${CI_JOB_TOKEN}@${CODECODE_DOMAIN}/${CI_PROJECT_FORKSOURCE} template
- diff template/.gitlab-ci.yml .gitlab-ci.yml -b -B -y -i --suppress-common-lines
- diff template/app/src/androidTest/java/net/codecode/consciencefood/ExampleInstrumentedTest.kt app/src/androidTest/java/net/codecode/consciencefood/ExampleInstrumentedTest.kt -b -B -y -i --suppress-common-lines
- fileidentity.sh
only:
- master
when: manual
allow_failure: true
code-analysis:
# image: "registry.cn-hangzhou.aliyuncs.com/engintime/ubuntu_16.04_program:latest"
stage: code-analysis
<<: *codecode-analysis-runner
script:
- ./gradlew assembleDebug --offline
- sonar-scanner -X -Dsonar.projectKey=ProjectKey-$CI_PROJECT_ID -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.links.homepage=$CI_PROJECT_URL -Dsonar.host.url=http://39.104.162.212:9000 -Dsonar.login=$SONAR_LOGIN -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.url=$CODECODE_PROTOCOL$CODECODE_DOMAIN
# - ./waitfinish.sh
allow_failure: true
only:
- master
\ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论