mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-06 11:35:49 +00:00
ci: add caiyun test
This commit is contained in:
parent
839c2ce6ad
commit
8661ba1bae
17
.github/workflows/make_test_ebook.yaml
vendored
17
.github/workflows/make_test_ebook.yaml
vendored
@ -10,6 +10,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
BBM_CAIYUN_API_KEY: ${{ secrets.BBM_CAIYUN_API_KEY }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
testing:
|
testing:
|
||||||
@ -28,10 +29,14 @@ jobs:
|
|||||||
- name: install python requirements
|
- name: install python requirements
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
- name: make normal ebook test using google translate
|
- name: Test install
|
||||||
run: |
|
run: |
|
||||||
python3 make_book.py --book_name "test_books/Liber_Esther.epub" --test --test_num 10 --model google --translate-tags div,p
|
pip install .
|
||||||
python3 make_book.py --book_name "test_books/Liber_Esther.epub" --test --test_num 20 --model google
|
|
||||||
|
- name: make normal ebook test using google translate and cli
|
||||||
|
run: |
|
||||||
|
bbook_maker --book_name "test_books/Liber_Esther.epub" --test --test_num 10 --model google --translate-tags div,p
|
||||||
|
bbook_maker--book_name "test_books/Liber_Esther.epub" --test --test_num 20 --model google
|
||||||
|
|
||||||
- name: make txt book test using google translate
|
- name: make txt book test using google translate
|
||||||
run: |
|
run: |
|
||||||
@ -41,6 +46,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python3 make_book.py --book_name "test_books/the_little_prince.txt" --test --batch_size 30 --test_num 20 --model google
|
python3 make_book.py --book_name "test_books/the_little_prince.txt" --test --batch_size 30 --test_num 20 --model google
|
||||||
|
|
||||||
|
- name: make caiyun translator test
|
||||||
|
if: env.BBM_CAIYUN_API_KEY != null
|
||||||
|
run: |
|
||||||
|
python3 make_book.py --book_name "test_books/the_little_prince.txt" --test --batch_size 30 --test_num 20 --model caiyun
|
||||||
|
|
||||||
- name: make openai key ebook test
|
- name: make openai key ebook test
|
||||||
if: env.OPENAI_API_KEY != null
|
if: env.OPENAI_API_KEY != null
|
||||||
@ -49,10 +58,10 @@ jobs:
|
|||||||
python3 make_book.py --book_name "test_books/animal_farm.epub" --test --test_num 5 --language ja --model gpt3 --prompt prompt_template_sample.txt
|
python3 make_book.py --book_name "test_books/animal_farm.epub" --test --test_num 5 --language ja --model gpt3 --prompt prompt_template_sample.txt
|
||||||
python3 make_book.py --book_name "test_books/animal_farm.epub" --test --test_num 5 --language ja --prompt prompt_template_sample.json
|
python3 make_book.py --book_name "test_books/animal_farm.epub" --test --test_num 5 --language ja --prompt prompt_template_sample.json
|
||||||
|
|
||||||
|
|
||||||
- name: Rename and Upload ePub
|
- name: Rename and Upload ePub
|
||||||
if: env.OPENAI_API_KEY != null
|
if: env.OPENAI_API_KEY != null
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: epub_output
|
name: epub_output
|
||||||
path: "test_books/lemo_bilingual.epub"
|
path: "test_books/lemo_bilingual.epub"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user