This repository was archived by the owner on Aug 26, 2024. It is now read-only.
File tree 1 file changed +18
-8
lines changed
1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 19
19
image : mysql:5.7
20
20
env :
21
21
MYSQL_ALLOW_EMPTY_PASSWORD : true
22
- MYSQL_ROOT_PASSWORD : root
23
- MYSQL_DATABASE : python_blogs
22
+ DBNAME : python_blogs
23
+ DBUSER : root
24
+ DBPASSWORD :
24
25
ports : ['3306:3306']
25
26
26
27
steps :
@@ -32,17 +33,14 @@ jobs:
32
33
key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
33
34
restore-keys : |
34
35
${{ runner.os }}-pip-
35
-
36
36
- name : Set up Python ${{ matrix.python-version }}
37
37
uses : actions/setup-python@v3
38
38
with :
39
39
python-version : ${{ matrix.python-version }}
40
-
41
40
- name : Install Dependencies
42
41
run : |
43
42
python -m pip install --upgrade pip
44
43
pip install -r requirements.txt
45
-
46
44
- name : Copy settings
47
45
run : |
48
46
cp settings_local.py.template settings_local.py
@@ -51,12 +49,24 @@ jobs:
51
49
run : |
52
50
sudo service mysql start
53
51
sudo mysql -uroot -proot -e 'CREATE DATABASE python_blogs;'
54
-
55
52
- name : Run Migrations
56
53
run : |
57
54
python manage.py migrate
58
55
python manage.py loaddata data.json
59
-
56
+ env :
57
+ DBENGINE : django.db.backends.mysql
58
+ DBNAME : python_blogs
59
+ DBUSER : root
60
+ DBPASSWORD :
61
+ DBHOST : 127.0.0.1
62
+ DBPORT : $
60
63
- name : Run Tests
61
64
run : |
62
- python manage.py test
65
+ python manage.py test
66
+ env :
67
+ DBENGINE : django.db.backends.mysql
68
+ DBNAME : python_blogs
69
+ DBUSER : root
70
+ DBPASSWORD :
71
+ DBHOST : 127.0.0.1
72
+ DBPORT : $
You can’t perform that action at this time.
0 commit comments