Skip to content

Commit

Permalink
Add alembic schema check
Browse files Browse the repository at this point in the history
  • Loading branch information
raffomania committed Nov 24, 2023
1 parent 7b068ee commit 26c8097
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/backend_check_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check backend database schema
on:
pull_request:
branches:
- main
- mwp_v1
paths:
- "backend/**"
- ".github/**"
- "docker/**"

jobs:
check-schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Start Docker Containers
run: |
cd docker
./setup-folders.sh
cp .env.example .env
chmod -R a+rwx backend_repo/ models_cache/ spacy_models/ tika/
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray
export GID=$(id -g)
export API_PRODUCTION_WORKERS=0
export RAY_CONFIG="./config_test_no_gpu.yaml"
docker compose -f compose-test.yml up -d --quiet-pull postgres dwts-backend-api
echo Waiting for containers to start...
sleep 30
cd ..
- name: Check that database schema is up-to-date
run: |
docker exec -i demo-dwts-backend-api-1 /opt/envs/dwts/bin/alembic check

0 comments on commit 26c8097

Please sign in to comment.