From 1b2ae721eb53f7097dded734d93ed972901552f1 Mon Sep 17 00:00:00 2001 From: Guanzhong Chen Date: Mon, 1 Jun 2020 23:13:41 -0400 Subject: [PATCH] Switch CI test database to MySQL (#1417) --- .ci.settings.py | 14 ++++++++++++++ .github/workflows/build.yml | 2 ++ 2 files changed, 16 insertions(+) diff --git a/.ci.settings.py b/.ci.settings.py index 12209302d..637c91839 100644 --- a/.ci.settings.py +++ b/.ci.settings.py @@ -7,3 +7,17 @@ CACHES = { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache' } } + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'dmoj', + 'USER': 'root', + 'PASSWORD': 'root', + 'HOST': 'localhost', + 'PORT': '3306', + 'OPTIONS': { + 'charset': 'utf8mb4', + }, + }, +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62542a971..0006d4170 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,5 +20,7 @@ jobs: pip install -r requirements.txt pip install mysqlclient cp .ci.settings.py dmoj/local_settings.py + - name: Start MySQL + run: sudo systemctl start mysql.service - name: Run unit tests run: python manage.py test judge