Merge pull request #11 from jeffery9/github_action

add github action
This commit is contained in:
yihong 2023-03-03 19:45:33 +08:00 committed by GitHub
commit c27efda1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

29
.github/workflows/make_test_ebook.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Pull Request
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
testing:
runs-on: ubuntu-latest
steps:
- name: install python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: checkout code
uses: actions/checkout@v3
- name: Check formatting (black)
run: black . --check
- name: install python requirements
run: pip install -r requirements.txt
- name: make test ebook
env:
KEY: ${{ secrets.OPENAI_KEY }}
run: python3 make.py --book_name test_books/animal_farm.epub --openai_key $KEY --no_limit --test