chore: migrate from Poetry to uv for dependency management #74
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Backend CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| name: Lint and Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'uv' | |
| - name: Sync dependencies | |
| working-directory: ./backend | |
| run: uv sync --frozen --no-install-project --group dev | |
| - name: Lint with Ruff | |
| working-directory: ./backend | |
| run: uv run --no-sync ruff check app/ | |
| - name: Format check with Ruff | |
| working-directory: ./backend | |
| run: uv run --no-sync ruff format app/ --check | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'uv' | |
| - name: Sync dependencies | |
| working-directory: ./backend | |
| run: uv sync --frozen --no-install-project --group dev | |
| - name: Create .env file with GitHub Secrets | |
| run: | | |
| echo "FRONTEND_URL=${{ secrets.FRONTEND_URL }}" >> backend/app/.env | |
| # LLM Provider | |
| echo "PROVIDER=${{ secrets.PROVIDER }}" >> backend/app/.env | |
| # Azure OpenAI Configuration | |
| echo "AZURE_API_VERSION=${{ secrets.AZURE_API_VERSION }}" >> backend/app/.env | |
| echo "AZURE_ENDPOINT=${{ secrets.AZURE_ENDPOINT }}" >> backend/app/.env | |
| echo "AZURE_API_KEY=${{ secrets.AZURE_API_KEY }}" >> backend/app/.env | |
| echo "AZURE_DEPLOYMENT_NAME=${{ secrets.AZURE_DEPLOYMENT_NAME }}" >> backend/app/.env | |
| echo "AZURE_EMBEDDING_DEPLOYMENT_NAME=${{ secrets.AZURE_EMBEDDING_DEPLOYMENT_NAME }}" >> backend/app/.env | |
| # Qdrant Configuration | |
| echo "QDRANT_URL=${{ secrets.QDRANT_URL }}" >> backend/app/.env | |
| echo "QDRANT_COLLECTION_NAME=${{ secrets.QDRANT_COLLECTION_NAME }}" >> backend/app/.env | |
| # Langfuse Configuration | |
| echo "LANGFUSE_SECRET_KEY=${{ secrets.LANGFUSE_SECRET_KEY }}" >> backend/app/.env | |
| echo "LANGFUSE_PUBLIC_KEY=${{ secrets.LANGFUSE_PUBLIC_KEY }}" >> backend/app/.env | |
| echo "LANGFUSE_HOST=${{ secrets.LANGFUSE_HOST }}" >> backend/app/.env | |
| - name: Run Tests | |
| working-directory: ./backend | |
| run: uv run --no-sync pytest app/tests/ --maxfail=1 --disable-warnings -v |