Skip to content

Commit

Permalink
Merge pull request #230 from saxix/mysql
Browse files Browse the repository at this point in the history
mysql
  • Loading branch information
domdinicola committed Oct 20, 2021
2 parents 87d658d + 7baee21 commit 2e51a07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
matrix:
python-version: [ "3.8", "3.9", "3.10"]
django-version: [ "2.2", "3.1", "3.2" ]
db-engine: [pg, mysql]
db-engine: ["pg", "mysql"]
env:
PY_VER: ${{ matrix.python-version}}
DJ_VER: ${{ matrix.django-version}}
DB_ENG: ${{ matrix.db-engine}}
DBENGINE: ${{ matrix.db-engine}}
MYSQL_USER: 'root'
MYSQL_PASSWORD: 'root'

services:
postgres:
Expand All @@ -45,9 +47,26 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

# mysql:
# image: mysql:5.7
# env:
# MYSQL_DATABASE: test_db
# MYSQL_USER: user
# MYSQL_PASSWORD: password
# MYSQL_ROOT_PASSWORD: rootpassword
# ports:
# - 33306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5

steps:
- uses: actions/checkout@v2

- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE concurrency;' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -57,7 +76,7 @@ jobs:
run: python -m pip install --upgrade pip tox

- name: Test with
run: tox -e d${DJ_VER//.}-py${PY_VER//.}-pg
run: tox -e d${DJ_VER//.}-py${PY_VER//.}-${DBENGINE}

- uses: codecov/codecov-action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/demoapp/demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
'HOST': '127.0.0.1',
'PORT': '',
'USER': 'root',
'PASSWORD': '',
'PASSWORD': 'root',
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci'}}
else:
Expand Down

0 comments on commit 2e51a07

Please sign in to comment.