Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit a531d05

Browse files
committed
update ci.yml
1 parent 77a8cf5 commit a531d05

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

.github/workflows/ci.yml

+18-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ jobs:
1919
image: mysql:5.7
2020
env:
2121
MYSQL_ALLOW_EMPTY_PASSWORD: true
22-
MYSQL_ROOT_PASSWORD: root
23-
MYSQL_DATABASE: python_blogs
22+
DBNAME: python_blogs
23+
DBUSER: root
24+
DBPASSWORD:
2425
ports: ['3306:3306']
2526

2627
steps:
@@ -32,17 +33,14 @@ jobs:
3233
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
3334
restore-keys: |
3435
${{ runner.os }}-pip-
35-
3636
- name: Set up Python ${{ matrix.python-version }}
3737
uses: actions/setup-python@v3
3838
with:
3939
python-version: ${{ matrix.python-version }}
40-
4140
- name: Install Dependencies
4241
run: |
4342
python -m pip install --upgrade pip
4443
pip install -r requirements.txt
45-
4644
- name: Copy settings
4745
run: |
4846
cp settings_local.py.template settings_local.py
@@ -51,12 +49,24 @@ jobs:
5149
run: |
5250
sudo service mysql start
5351
sudo mysql -uroot -proot -e 'CREATE DATABASE python_blogs;'
54-
5552
- name: Run Migrations
5653
run: |
5754
python manage.py migrate
5855
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: $
6063
- name: Run Tests
6164
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: $

0 commit comments

Comments
 (0)