Skip to content

Commit

Permalink
[test] pull data
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingyueyixi committed Sep 29, 2024
1 parent 6439462 commit 972cc01
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Android CI

on:
push:
branches: [ "main", "v*/**"]
branches: [ "main", "v*/**", "test/*"]
pull_request:
branches: [ "main" , "v*/**"]

Expand Down Expand Up @@ -66,12 +66,12 @@ jobs:
releaseArtifactName=`ls app/build/outputs/apk/release/*.apk | grep -Po "(?<=release/).*(?=\.apk)"` && echo "releaseArtifactName=$releaseArtifactName" >> $GITHUB_OUTPUT
debugArtifactName=`ls app/build/outputs/apk/debug/*.apk | grep -Po "(?<=debug/).*(?=\.apk)"` && echo "debugArtifactName=$debugArtifactName" >> $GITHUB_OUTPUT
- name: Upload Archive Release-Apk
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepareArtifact.outputs.releaseArtifactName }}
path: app/build/outputs/apk/release/*.apk

# - name: Upload Archive Release-Apk
# uses: actions/upload-artifact@v4
# with:
# name: ${{ steps.prepareArtifact.outputs.releaseArtifactName }}
# path: app/build/outputs/apk/release/*.apk
#
- name: Upload Archive Debug-Apk
uses: actions/upload-artifact@v4
with:
Expand All @@ -84,9 +84,9 @@ jobs:
BOT_TOKEN: ${{ secrets.TG_CI_BOT_TOKEN }}
run: |
echo "github_run_url=$GITHUB_RUN_URL"
echo '${{ toJson(github) }}'> github_context.txt
if [ -f "robot.py" ]; then
python robot.py -e ci
fi
echo "$GITHUB_CONTEXT"> github_context.txt
# if [ -f "robot.py" ]; then
# python robot.py -e ci
# fi
# curl -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" -d "chat_id=$CHAT_ID&text=CI编译完成${github_run_url}"

3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ android {
buildConfigField "int", "VERSION_CODE", "${versionCode}"
buildConfigField "String", "VERSION_NAME", "\"${versionName}\""
buildConfigField "String", "buildInfoJson64", "\"${buildInfoJson.bytes.encodeBase64()}\""
buildConfigField "String", "tgToken", "\"${System.getenv('BOT_TOKEN')}\""
buildConfigField "String", "tgChatId", "\"${System.getenv('CHAT_ID')}\""

}
// sourceSets {
// main{
Expand Down
1 change: 1 addition & 0 deletions robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def setup_test():
"http": "127.0.0.1:7890",
"https": "127.0.0.1:7890"
}
http.verify = False
met.github_context = json_loads(read_file('test_data/git_context.json'), {})
met.bot_token = bytes(
[53, 57, 55, 50, 48, 54, 51, 52, 53, 49, 58, 65, 65, 70, 52, 98, 72, 98, 103, 72, 68, 88, 84, 112, 85, 103, 120,
Expand Down

0 comments on commit 972cc01

Please sign in to comment.