mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-06 11:35:49 +00:00
41 lines
878 B
YAML
41 lines
878 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
BBM_DEEPL_API_KEY: ${{ secrets.BBM_DEEPL_API_KEY }}
|
|
|
|
jobs:
|
|
testing:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: install python 3.9
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
cache: 'pip' # caching pip dependencies
|
|
- name: Check formatting (black)
|
|
run: |
|
|
pip install black
|
|
black . --check
|
|
- name: install python requirements
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Test install
|
|
run: |
|
|
pip install .
|
|
|
|
- name: Run tests
|
|
run: |
|
|
pip install pytest
|
|
pytest tests
|
|
|