-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix migration error in CRON type of CI. (#2606)
* Wait response from API `/server/about` before creating superuser in cron tests Co-authored-by: Kruchinin <[email protected]>
- Loading branch information
1 parent
83193d0
commit 4816808
Showing
1 changed file
with
2 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -23,6 +23,7 @@ env: | |
DJANGO_SU_EMAIL="[email protected]" | ||
DJANGO_SU_PASSWORD="12qwaszx" | ||
NODE_VERSION="12" | ||
API_ABOUT_PAGE="localhost:8080/api/v1/server/about" | ||
|
||
before_install: | ||
- nvm install ${NODE_VERSION} | ||
|
@@ -34,7 +35,7 @@ script: | |
- if [[ $TRAVIS_EVENT_TYPE == "cron" && $TRAVIS_BRANCH == "develop" ]]; | ||
then | ||
docker-compose -f docker-compose.yml -f ./tests/docker-compose.email.yml up -d --build; | ||
docker exec -it cvat bash -ic 'python3 ~/manage.py migrate'; | ||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${API_ABOUT_PAGE})" != "401" ]]; do sleep 5; done'; | ||
docker exec -it cvat bash -ic "echo \"from django.contrib.auth.models import User; User.objects.create_superuser('${DJANGO_SU_NAME}', '${DJANGO_SU_EMAIL}', '${DJANGO_SU_PASSWORD}')\" | python3 ~/manage.py shell"; | ||
cd ./tests && npm install && npm run cypress:run:firefox; exit $?; | ||
fi; | ||
|