Ошибка несуществования отношения "auth_user" при выполнении действия GitHub
У меня следующая конфигурация GitHub CI для приложения Django. Действие терпит неудачу при ошибке relation "auth_user" does not exist
.
В проекте есть пользовательская модель авторизации AUTH_USER_MODEL = "uzivatel.User"
, которая разработана в приложении uzivatel
.
Здесь находится файл ci.yml
. Конфигурацию проекта можно найти здесь: https://github.com/ARUP-CAS/aiscr-webamcr/blob/dev/webclient/webclient/settings/base.py.
name: Django Tests
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres: # we need a postgres docker image to be booted a side car service to run the tests that needs a db
image: postgis/postgis
env: # the environment variable must match with app/settings.py if block of DATBASES variable otherwise test will fail due to connectivity issue.
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_secretpass
POSTGRES_DB: test_db
ports:
- 5432:5432 # exposing 5432 port for application to use
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r webclient/webclient/requirements/dev.txt
- name: Install gdal dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdal-dev locales
gdal-config --version
env:
CPLUS_INCLUDE_PATH: /usr/include/gdal
C_INCLUDE_PATH: /usr/include/gdal
- name: Install gdal
run: |
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
- name: Run Migrations # run migrations to create table in side car db container
working-directory: ./webclient
run: |
python manage.py migrate --settings=webclient.settings.dev
- name: Django Testing
working-directory: ./webclient
run: |
python manage.py test --settings=webclient.settings.dev