Commit cf23616 1 parent f991615 commit cf23616 Copy full SHA for cf23616
File tree 3 files changed +36
-3
lines changed
3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Release-pypi
1
+ name : Release
2
2
3
3
on :
4
4
workflow_dispatch :
5
5
6
+ push :
7
+ tags :
8
+ - " v*"
9
+
6
10
jobs :
7
- Pypi :
11
+ pypi :
8
12
strategy :
9
13
matrix :
10
14
python-version : ["3.9"]
32
36
uses : pypa/gh-action-pypi-publish@release/v1
33
37
with :
34
38
password : ${{ secrets.PYPI_API }}
39
+
40
+ github :
41
+ needs : [pypi]
42
+ runs-on : ubuntu-20.04
43
+ steps :
44
+ - uses : actions/checkout@v3
45
+ with :
46
+ submodules : recursive
47
+
48
+ - name : Release
49
+ uses : softprops/action-gh-release@v2
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ license = "GPL-3.0-only"
39
39
name = " yuisub"
40
40
readme = " README.md"
41
41
repository = " https://github.com/TensoRaws/yuisub"
42
- version = " 1.1.2 "
42
+ version = " 1.2.0 "
43
43
44
44
# Requirements
45
45
[tool .poetry .dependencies ]
Original file line number Diff line number Diff line change 7
7
from . import util
8
8
9
9
10
+ def test_translator_sub_init () -> None :
11
+ translator = SubtitleTranslator (
12
+ torch_device = util .DEVICE ,
13
+ whisper_model = util .MODEL_NAME ,
14
+ model = util .OPENAI_MODEL ,
15
+ api_key = util .OPENAI_API_KEY ,
16
+ base_url = util .OPENAI_BASE_URL ,
17
+ bangumi_url = util .BANGUMI_URL ,
18
+ bangumi_access_token = util .BANGUMI_ACCESS_TOKEN ,
19
+ )
20
+
21
+ assert translator .model == util .OPENAI_MODEL
22
+ assert translator .api_key == util .OPENAI_API_KEY
23
+ assert translator .base_url == util .OPENAI_BASE_URL
24
+ assert translator .bangumi_url == util .BANGUMI_URL
25
+ assert translator .bangumi_access_token == util .BANGUMI_ACCESS_TOKEN
26
+
27
+
10
28
@pytest .mark .skipif (os .environ .get ("GITHUB_ACTIONS" ) == "true" , reason = "Skipping test when running on CI" )
11
29
async def test_translator_sub () -> None :
12
30
translator = SubtitleTranslator (
You can’t perform that action at this time.
0 commit comments