Skip to content
Open
14 changes: 9 additions & 5 deletions .github/workflows/preprod-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: Build and Publish Preprod
on:
workflow_dispatch:
inputs:
branch:
description: "Branch to deploy in preprod"
pr:
description: "PR to deploy in preprod"
required: true
default: "main"
preprod_env:
description: "Preprod environment"
required: true
Expand All @@ -28,10 +27,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Branch name from input PR number
id: branch
run: |
branch=$(curl -fs ${{ github.api_url }}/repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }} | jq -r '.head.ref')
echo "branch=${branch:?'PR #${{ github.event.inputs.pr }} does not exist'}" >> "$GITHUB_OUTPUT"
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.branch }}
ref: ${{ steps.branch.outputs.branch }}

- name: Docker metadata
id: meta
Expand All @@ -44,7 +48,7 @@ jobs:
type=sha,prefix={{branch}}-
labels: |
preprod.environment=${{ github.event.inputs.preprod_env }}
preprod.branch=${{ github.event.inputs.branch }}
preprod.pr=${{ github.event.inputs.pr }}

- name: Set up Docker Buildx
uses: docker/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
key: pytest_cache-${{ github.head_ref }}

- name: Run unit tests with Postgresql
run: python -m pytest --cov
run: python -m pytest --cov -n auto

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
Expand Down
4 changes: 1 addition & 3 deletions app/core/core_endpoints/endpoints_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ async def read_information(
status_code=200,
)
async def read_privacy():
"""
Return Hyperion privacy
"""
"""Return Hyperion privacy"""

return FileResponse("assets/privacy.txt")

Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ pytest-alembic==0.12.1
pytest-asyncio==0.26.0
pytest-cov==6.1.1
pytest-mock==3.14.1
pytest-xdist==3.8.0 # to run tests in parallel
pytest==8.3.5
ruff==0.11.8
types-aiofiles==24.1.0.20250516
types-Authlib==1.5.0.20250516
types-fpdf2==2.8.3.20250516
types-psutil==7.0.0.20250601
types-redis==4.6.0.20241004
types-requests==2.32.0.20250515
types-requests==2.32.0.20250515
Loading