39 lines
No EOL
1,009 B
YAML
39 lines
No EOL
1,009 B
YAML
name: Test EPUB Viewer
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest
|
|
pip install flask elasticsearch ebooklib beautifulsoup4 PyPDF2
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd api
|
|
python -m pytest test_epub_viewer.py -v
|
|
|
|
- name: Run integration tests with Playwright
|
|
run: |
|
|
pip install playwright pytest-playwright
|
|
playwright install
|
|
cd api
|
|
python -m pytest test_epub_viewer_integration.py -v
|
|
if: false # Disabled until we create the integration tests with Playwright |