Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
HideSeek2
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸大学计算机学院
教师群组
宋海霞-shx
androidTest
tempTest
HideSeek2
提交
c7e35498
提交
c7e35498
10月 16, 2020
创建
作者:
宋海霞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify
上级
88293333
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
53 行删除
+40
-53
.gitlab-ci.yml
.gitlab-ci.yml
+38
-42
readme.md
readme.md
+2
-0
sonar-project.properties
sonar-project.properties
+0
-11
没有找到文件。
.gitlab-ci.yml
浏览文件 @
c7e35498
image
:
"
android-container:9.1"
image
:
"
registry.cn-hangzhou.aliyuncs.com/engintime/android-container:latest"
variables
:
# ANDROID_COMPILE_SDK: "25"
# ANDROID_BUILD_TOOLS: "24.0.0"
# ANDROID_SDK_TOOLS: "24.4.1"
before_script
:
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
-
chmod +x ./gradlew
# - chmod +x ./waitfinish.sh
stages
:
stages
:
-
code-analysis
-
case1
-
case1
-
code-analysis
variables
:
PACKAGE_NAME
:
"
net.codecode.hideseek"
PACKAGE_PATH
:
"
/net/codecode/hideseek/"
.
codecode-runner
:
&codecode
-runner
.
android-runner
:
&android
-runner
tags
:
tags
:
-
ubuntu-1
6
.04
-
ubuntu-1
8
.04
-
long-job
-
long-job
-
android-app
-
android-app
.codecode-analysis-runner
:
&codecode-analysis-runner
.codecode-analysis-runner
:
&codecode-analysis-runner
tags
:
tags
:
-
ubuntu-16.04
-
ubuntu-18.04
-
long-job
-
short-job
-
android-app
-
code-analysis
# - code-analysis
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 -Dsonar.projectKey=ProjectKey-$CI_PROJECT_ID -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.links.homepage=$CI_PROJECT_URL -Dsonar.host.url=$SONAR_URL -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
.codecode-runner
:
&codecode-runner
tags
:
-
ubuntu-16.04
-
short-job
case1
:
case1
:
stage
:
case1
stage
:
case1
<<
:
*
codecode
-runner
<<
:
*
android
-runner
script
:
script
:
-
./gradlew assembleDebug --offline --build-cache
-
./gradlew assembleDebug --offline --build-cache
-
>
-
>
...
@@ -60,15 +52,13 @@ case1:
...
@@ -60,15 +52,13 @@ case1:
-
avdmanager create avd --force --name "test" --device "pixel" --package "system-images;android-30;google_apis;x86" > /dev/null
-
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 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
-
/android-wait-for-emulator.sh 20
-
adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS
-
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 22
-
sleep 3; adb shell input keyevent 22
-
sleep 3; adb shell input keyevent 66
-
sleep 3; adb shell input keyevent 66
-
adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS
-
adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS
# - ./gradlew cAT --offline
-
./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=${PACKAGE_NAME}.Work1Test#work1Test --offline --build-cache
-
./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=com.example.mysecondapp.ExampleInstrumentedTest#useAppContext --offline --build-cache
-
>
-
>
echo
echo
...
@@ -78,7 +68,7 @@ case1:
...
@@ -78,7 +68,7 @@ case1:
echo "==========================================="
echo "==========================================="
-
./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=
com.example.mysecondapp.ExampleKotlinTest#useEspresso
Test --offline --build-cache
-
./gradlew app:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=
${PACKAGE_NAME}.Work2Test#work2
Test --offline --build-cache
-
>
-
>
echo
echo
...
@@ -90,10 +80,6 @@ case1:
...
@@ -90,10 +80,6 @@ case1:
# artifacts:
# paths:
# - app/build/reports/androidTests/
teacher-check1
:
teacher-check1
:
image
:
"
registry.cn-hangzhou.aliyuncs.com/engintime/alpine_git:latest"
image
:
"
registry.cn-hangzhou.aliyuncs.com/engintime/alpine_git:latest"
stage
:
case1
stage
:
case1
...
@@ -101,13 +87,23 @@ teacher-check1:
...
@@ -101,13 +87,23 @@ teacher-check1:
before_script
:
[]
before_script
:
[]
script
:
script
:
-
git clone ${CODECODE_PROTOCOL}gitlab-ci-token:${CI_JOB_TOKEN}@${CODECODE_DOMAIN}/${CI_PROJECT_FORKSOURCE} template
-
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/.gitlab-ci.yml .gitlab-ci.yml -b -B -
i
-
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
-
diff template/app/src/androidTest/java
${PACKAGEPATH}Work1Test.kt app/src/androidTest/java${PACKAGE_PATH}Work1Test.kt -b -B -i
-
fileidentity.sh
-
diff template/app/src/androidTest/java${PACKAGEPATH}Work2Test.kt app/src/androidTest/java${PACKAGE_PATH}Work2Test.kt -b -B -i
only
:
only
:
-
master
-
master
when
:
manual
when
:
manual
allow_failure
:
true
allow_failure
:
true
code-analysis
:
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=$SONAR_URL -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
allow_failure
:
true
only
:
-
master
readme.md
0 → 100644
浏览文件 @
c7e35498
请教师用户首先访问
[
教师项目群组
](
https://www.codecode.net/engintime/android-app/teachers-packet
)
,申请权限并审核通过后,再
[
domain relative url
](
engintime/android-app/Lab-Answer/HideSeek.git
)
访问本项目的参考答案
\ No newline at end of file
sonar-project.properties
浏览文件 @
c7e35498
#sonar.projectKey=MySecondApp
#sonar.projectName=MySecondApp
#sonar.projectVersion=1.0
# Path to the parent source code directory.
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# Since SonarQube 4.2, this property is optional if sonar.modules is set.
# If not set, SonarQube starts looking for source code from the directory containing
sonar.language
=
java
sonar.language
=
java
# the sonar-project.properties file.
sonar.sources
=
app/src
sonar.sources
=
app/src
# Encoding of the source code
sonar.sourceEncoding
=
UTF-8
sonar.sourceEncoding
=
UTF-8
# Additional parameters
#sonar.my.property=value
#sonar.java.binaries=app/build/intermediates/javac/debug/classes/com/example/mysecondapp
#sonar.java.binaries=app/build/intermediates/javac/debug/classes/com/example/mysecondapp
sonar.java.binaries
=
app/build/intermediates/javac/debug/classes
sonar.java.binaries
=
app/build/intermediates/javac/debug/classes
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论