mirror of
https://github.com/bellingcat/whisperbox-transcribe.git
synced 2026-06-08 03:28:35 +03:00
ci: enable github actions
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -9,13 +9,14 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
python-version: '3.10'
|
||||
cache: 'pip'
|
||||
- pip install -e .[dev]
|
||||
- black --check app
|
||||
- isort --check app
|
||||
- flake8 app
|
||||
- mypy app
|
||||
cache-dependency-path: '**/pyproject.toml'
|
||||
- run: pip install -e .[web,tooling]
|
||||
- run: black --check app
|
||||
- run: isort --check app
|
||||
- run: flake8 app
|
||||
- run: mypy app
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test
|
||||
@@ -23,7 +24,8 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
python-version: '3.10'
|
||||
cache: 'pip'
|
||||
- pip install -e .[test]
|
||||
- pytest
|
||||
cache-dependency-path: '**/pyproject.toml'
|
||||
- run: pip install -e .[web,tooling]
|
||||
- run: pytest
|
||||
|
||||
@@ -7,10 +7,11 @@ from sqlalchemy.orm import Session
|
||||
import app.shared.db.dtos as dtos
|
||||
import app.shared.db.models as models
|
||||
from app.shared.db.dtos import JobStatus, JobType
|
||||
from app.web.main import app, celery
|
||||
from app.web.main import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
@pytest.fixture(name="mock_job", scope="function", autouse=False)
|
||||
def mock_job(db_session: Session) -> models.Job:
|
||||
job = models.Job(
|
||||
|
||||
2
mypy.ini
2
mypy.ini
@@ -1,4 +1,4 @@
|
||||
[mypy]
|
||||
plugins = pydantic.mypy, sqlmypy
|
||||
plugins = sqlmypy
|
||||
ignore_missing_imports = True
|
||||
disallow_untyped_defs = True
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[project]
|
||||
name = "whisperbox"
|
||||
name = "whisperbox_transcription"
|
||||
description = ""
|
||||
version = "0.0.1"
|
||||
|
||||
@@ -21,25 +21,25 @@ worker=[
|
||||
"requests ==2.28.2"
|
||||
]
|
||||
|
||||
lint = [
|
||||
tooling = [
|
||||
# code formatting
|
||||
"black",
|
||||
"isort",
|
||||
"black ==23.1.0",
|
||||
"isort ==5.12.0",
|
||||
# linting
|
||||
"flake8",
|
||||
"mypy",
|
||||
]
|
||||
|
||||
test = [
|
||||
"flake8 ==6.0.0",
|
||||
# tests
|
||||
"httpx",
|
||||
"sqlalchemy-stubs",
|
||||
"sqlalchemy-utils ==0.39.0",
|
||||
"python-dotenv",
|
||||
"pytest",
|
||||
"python-dotenv ==0.21.1",
|
||||
"pytest ==7.2.1",
|
||||
# types
|
||||
"mypy ==1.0.0",
|
||||
"sqlalchemy-stubs ==0.4",
|
||||
"types-requests ==2.28.11.12"
|
||||
]
|
||||
|
||||
worker_dev = [
|
||||
"watchdog[watchmedo]"
|
||||
"watchdog[watchmedo] ==2.2.1"
|
||||
]
|
||||
|
||||
[tool.isort]
|
||||
|
||||
Reference in New Issue
Block a user