Skip to content

Commit

Permalink
release: v1.2.0 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tohrusky authored Dec 1, 2024
1 parent f991615 commit cf23616
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Release-pypi
name: Release

on:
workflow_dispatch:

push:
tags:
- "v*"

jobs:
Pypi:
pypi:
strategy:
matrix:
python-version: ["3.9"]
Expand Down Expand Up @@ -32,3 +36,14 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API }}

github:
needs: [pypi]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Release
uses: softprops/action-gh-release@v2
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ license = "GPL-3.0-only"
name = "yuisub"
readme = "README.md"
repository = "https://github.com/TensoRaws/yuisub"
version = "1.1.2"
version = "1.2.0"

# Requirements
[tool.poetry.dependencies]
Expand Down
18 changes: 18 additions & 0 deletions tests/test_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@
from . import util


def test_translator_sub_init() -> None:
translator = SubtitleTranslator(
torch_device=util.DEVICE,
whisper_model=util.MODEL_NAME,
model=util.OPENAI_MODEL,
api_key=util.OPENAI_API_KEY,
base_url=util.OPENAI_BASE_URL,
bangumi_url=util.BANGUMI_URL,
bangumi_access_token=util.BANGUMI_ACCESS_TOKEN,
)

assert translator.model == util.OPENAI_MODEL
assert translator.api_key == util.OPENAI_API_KEY
assert translator.base_url == util.OPENAI_BASE_URL
assert translator.bangumi_url == util.BANGUMI_URL
assert translator.bangumi_access_token == util.BANGUMI_ACCESS_TOKEN


@pytest.mark.skipif(os.environ.get("GITHUB_ACTIONS") == "true", reason="Skipping test when running on CI")
async def test_translator_sub() -> None:
translator = SubtitleTranslator(
Expand Down

0 comments on commit cf23616

Please sign in to comment.