Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Для ручного запуска

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Tesseract
run: |
sudo apt-get update
sudo apt-get install -y tesseract-ocr tesseract-ocr-rus

- name: Install Poppler
run: |
sudo apt-get install -y poppler-utils

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Create dummy credentials file
run: |
echo "{}" > credentials.json

- name: Create test PDF fixture
run: |
mkdir -p tests/fixtures
echo "Creating dummy PDF for testing"
# Убедитесь, что у вас есть скрипт для создания PDF или добавьте существующий PDF
# Пример: скопируйте тестовый PDF, если он есть в репозитории
# cp tests/fixtures/test_report.pdf tests/fixtures/report.pdf || true

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pytest tests/ -v --log-cli-level=DEBUG
Loading