This repository was archived by the owner on Aug 26, 2024. It is now read-only.
File tree 1 file changed +8
-18
lines changed
1 file changed +8
-18
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
- DBNAME : python_blogs
23
- DBUSER : root
24
- DBPASSWORD :
22
+ MYSQL_ROOT_PASSWORD : root
23
+ MYSQL_DATABASE : python_blogs
25
24
ports : ['3306:3306']
26
25
27
26
steps :
@@ -33,14 +32,17 @@ jobs:
33
32
key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
34
33
restore-keys : |
35
34
${{ 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
+
40
41
- name : Install Dependencies
41
42
run : |
42
43
python -m pip install --upgrade pip
43
44
pip install -r requirements.txt
45
+
44
46
- name : Copy settings
45
47
run : |
46
48
cp settings_local.py.template settings_local.py
@@ -49,24 +51,12 @@ jobs:
49
51
run : |
50
52
sudo service mysql start
51
53
sudo mysql -uroot -proot -e 'CREATE DATABASE python_blogs;'
54
+
52
55
- name : Run Migrations
53
56
run : |
54
57
python manage.py migrate
55
58
python manage.py loaddata data.json
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 : $
59
+
63
60
- name : Run Tests
64
61
run : |
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 : $
62
+ python manage.py test
You can’t perform that action at this time.
0 commit comments