mirror of
https://github.com/Mas0nShi/typoraCracker.git
synced 2023-07-10 13:41:20 +08:00
adds test unit
This commit is contained in:
12
.github/workflows/manual.yml
vendored
12
.github/workflows/manual.yml
vendored
@@ -76,6 +76,7 @@ jobs:
|
||||
needs: [check_version, create_release]
|
||||
runs-on: ubuntu-20.04
|
||||
if: needs.check_version.outputs.RELEASE_VERSION != needs.check_version.outputs.LATEST_VERSION
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
@@ -154,3 +155,14 @@ jobs:
|
||||
asset_path: '${{ github.workspace }}/auto-analysis/linux/x64/build/typoraCracker.zip'
|
||||
asset_name: 'typoraCracker-${{ needs.check_version.outputs.LATEST_VERSION }}-linux-x64.zip'
|
||||
asset_content_type: application/zip
|
||||
|
||||
-name: verify scripts
|
||||
run: |
|
||||
python3 -m pip install -r auto-analysis/win/x64/build/requirements.txt
|
||||
|
||||
python3 auto-analysis/win/x64/build/typora.py auto-analysis/win/x64/app/resources/app.asar auto-analysis/win/x64
|
||||
echo "win x64 test completed"
|
||||
python3 auto-analysis/win/x86/build/typora.py auto-analysis/win/x86/app/resources/app.asar auto-analysis/win/x86
|
||||
echo "win x86 test completed"
|
||||
python3 auto-analysis/linux/x64/build/typora.py auto-analysis/linux/x64/bin/Typora-linux-x64/resources/app.asar auto-analysis/linux/x64
|
||||
echo "linux x64 test completed"
|
||||
@@ -17,4 +17,9 @@ DOWNLOAD_LINK = {
|
||||
"x64": "https://download.typora.io/linux/Typora-linux-x64.tar.gz",
|
||||
"arm64": "https://download.typora.io/linux/Typora-linux-arm64.tar.gz",
|
||||
},
|
||||
}
|
||||
|
||||
EXTRACT_ROOT_PATH = {
|
||||
"win": "app",
|
||||
"linux": "bin/Typora-linux-x64"
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
@Desc: It's all about getting better.
|
||||
"""
|
||||
from loguru import logger as log
|
||||
from config import DOWNLOAD_LINK
|
||||
from config import DOWNLOAD_LINK, EXTRACT_ROOT_PATH
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
@@ -70,21 +70,21 @@ def win_x64_run():
|
||||
from win.x64 import analysis
|
||||
dirs = os.path.join(BASE_DIR, "win/x64")
|
||||
url = DOWNLOAD_LINK["win"]["x64"]
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path="app")
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path=EXTRACT_ROOT_PATH["win"])
|
||||
|
||||
|
||||
def win_x86_run():
|
||||
from win.x86 import analysis
|
||||
dirs = os.path.join(BASE_DIR, "win/x86")
|
||||
url = DOWNLOAD_LINK["win"]["x86"]
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path="app")
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path=EXTRACT_ROOT_PATH["win"])
|
||||
|
||||
|
||||
def linux_x64_run():
|
||||
from linux.x64 import analysis
|
||||
dirs = os.path.join(BASE_DIR, "linux/x64")
|
||||
url = DOWNLOAD_LINK["linux"]["x64"]
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path="bin/Typora-linux-x64")
|
||||
scheduler(func=analysis, basedir=dirs, link=url, root_path=EXTRACT_ROOT_PATH["linux"])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
BIN
exports.tar.gz
BIN
exports.tar.gz
Binary file not shown.
Reference in New Issue
Block a user