-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request !4 from WillQvQ/send_to_bot
- Loading branch information
Showing
31 changed files
with
100 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
pipeline { | ||
agent { | ||
docker { | ||
image 'ubuntu_tester' | ||
args '-u root:root -v ${HOME}/html/docs:/docs -v ${HOME}/html/_ci:/ci' | ||
} | ||
} | ||
environment { | ||
PJ_NAME = 'fitlog' | ||
POST_URL = 'https://open.feishu.cn/open-apis/bot/v2/hook/ab4aa33b-1c7a-403c-8a83-fdc27fc9d8d1' | ||
} | ||
stages { | ||
stage('Package Installation') { | ||
steps { | ||
sh 'python setup.py install' | ||
} | ||
} | ||
stage('Parallel Stages') { | ||
parallel { | ||
stage('Document Building') { | ||
steps { | ||
sh 'cd docs && make prod' | ||
sh 'rm -rf /docs/${PJ_NAME}' | ||
sh 'mv docs/build/html /docs/${PJ_NAME}' | ||
} | ||
} | ||
stage('Package Testing') { | ||
steps { | ||
sh 'pytest ./test --html=test_results.html --self-contained-html' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
sh 'post' | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
version: 2 | ||
|
||
sphinx: | ||
configuration: doc/source/conf.py | ||
configuration: docs/source/conf.py | ||
|
||
build: | ||
image: latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import unittest | ||
import os | ||
import shutil | ||
from fitlog.fastgit import committer | ||
|
||
|
||
class TextExample(unittest.TestCase): | ||
def setUp(self): # 定义一个setup,放一些准备的工作,或者准备一些测试数据。 | ||
os.mkdir('testArea') | ||
|
||
def test_init(self): | ||
ret = committer.init_project('testArea/test_pj', git=False) | ||
self.assertEqual(ret, 0) | ||
|
||
def tearDown(self): # 定义一个tearDown,在测试完的时候我要对测试有一个销毁的过程 | ||
shutil.rmtree('testArea', ignore_errors=True) | ||
|
||
# 基本参考 https://docs.python.org/zh-cn/3/library/unittest.html | ||
# mock 提供了更多的可能性 https://docs.python.org/zh-cn/3/library/unittest.mock.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
from fitlog.fastserver.app import start_app | ||
|
||
def run_app(): | ||
|
||
log_dir ='../../model_test/codes/V1/logs' | ||
def run_app(): | ||
log_dir = '../../model_test/codes/V1/logs' | ||
log_config_name = 'default.cfg' | ||
port = 5000 | ||
start_app(log_dir, log_config_name, port, 1, '123') | ||
|
||
|
||
if __name__ == '__main__': | ||
run_app() | ||
run_app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters