From e276badbf74e19a52318fc7e00b80526c6009fc0 Mon Sep 17 00:00:00 2001 From: Shashank Verma Date: Wed, 4 Oct 2023 09:58:17 +0530 Subject: [PATCH] .github: django: Use runner MySQL Signed-off-by: Shashank Verma --- .github/workflows/django.yml | 11 ++++------- contrihub/settings.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 8eb6ad4..dce0252 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -17,13 +17,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Shutdown Ubuntu MySQL (SUDO) - run: sudo service mysql stop - - name: Setup MySQL - uses: mirromutth/mysql-action@v1.1 - with: - mysql user: 'dbuser' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too - mysql password: '1234' # Required if "mysql user" exists. The password for the "mysql user" + - name: Set up MySQL + run: | + sudo /etc/init.d/mysql start + mysql -uroot -proot -hlocalhost -P3306 -e "create database 'contrihub23_db'" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: diff --git a/contrihub/settings.py b/contrihub/settings.py index 87a99b7..1e56195 100644 --- a/contrihub/settings.py +++ b/contrihub/settings.py @@ -74,7 +74,7 @@ # Database # https://docs.djangoproject.com/en/3.2/ref/settings/#databases -DB_NAME = config('DB_NAME', default='contrihub') +DB_NAME = config('DB_NAME', default='contrihub23_db') DB_USER = config('DB_USER', default='dbuser') DB_PASSWORD = config('DB_PASSWORD', default='1234') DB_HOST = config('DB_HOST', default='localhost')