Skip to content

Commit

Permalink
Merge pull request #3 from IDinsight/remove-openai-llm
Browse files Browse the repository at this point in the history
Remove LiteLLM proxy
  • Loading branch information
suzinyou authored Aug 14, 2024
2 parents 75d9e65 + a6064f0 commit 8efce5c
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 946 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/alembic-migrations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Alembic Migration Check

on:
pull_request:
branches:
- main
paths:
- "core_backend/migrations/versions/**.py"
- ".github/workflows/alembic-migrations.yaml"

push:
branches:
- main
paths:
- "core_backend/migrations/versions/**.py"
- ".github/workflows/alembic-migrations.yaml"

jobs:
check-for-outdated-heads:
runs-on: ubuntu-20.04

steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install Python libraries
run: |
python -m pip install -r core_backend/requirements.txt
- name: Get Alembic head of main branch
if: github.event_name == 'pull_request'
run: |
cd core_backend
alembic_head_main=$(alembic heads | awk '{print $1}')
echo "ALEMBIC_HEAD_MAIN=${alembic_head_main}" >> $GITHUB_ENV
- name: Checkout PR branch
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Check if Alembic head revision from main branch exists in feature branch DURING PR
if: github.event_name == 'pull_request'
run: |
cd core_backend
alembic_history_pr=$(alembic history)
if echo "${alembic_history_pr}" | grep -q "$ALEMBIC_HEAD_MAIN"; then
echo "Alembic head revision from main branch exists in PR branch."
else
echo "Alembic head revision from main branch does NOT exist in PR branch. Update your migrations to align with main branch."
exit 1
fi
- name: Check for multiple Alembic heads after PR is merged
if: github.event_name == 'push'
run: |
cd core_backend
alembic_heads=$(alembic heads | wc -l)
if [ "$alembic_heads" -gt 1 ]; then
echo "Multiple Alembic heads detected in the main branch after PR merge. Resolve the heads to maintain a single migration history."
exit 1
else
echo "No multiple Alembic heads detected."
fi
121 changes: 0 additions & 121 deletions .github/workflows/deploy_gcp_admin_app.yaml

This file was deleted.

111 changes: 0 additions & 111 deletions .github/workflows/deploy_gcp_caddy.yaml

This file was deleted.

Loading

0 comments on commit 8efce5c

Please sign in to comment.