-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b068ee
commit 26c8097
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |