try using a github action for mysql w/ burnettk

This commit is contained in:
jasquat 2022-05-20 15:14:19 -04:00
parent a1ec53209d
commit a1fa050aee
2 changed files with 30 additions and 12 deletions

View File

@ -78,17 +78,17 @@ jobs:
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: "always"
services:
mysql:
if: matrix.database == 'mysql'
image: mariadb:10.3
env:
MYSQL_DATABASE: spiff_workflow_webapp_testing
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD:
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# services:
# mysql:
# if: matrix.database == 'mysql'
# image: mariadb:10.3
# env:
# MYSQL_DATABASE: spiff_workflow_webapp_testing
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
# MYSQL_ROOT_PASSWORD:
# ports:
# - 3306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Check out the repository
@ -148,6 +148,24 @@ jobs:
restore-keys: |
${{ steps.pre-commit-cache.outputs.result }}-
- name: Setup Mysql
uses: mirromutth/mysql-action@v1.1
with:
host port: 3306
container port: 3306
mysql version: '8.0'
mysql database: 'spiff_workflow_webapp_testing'
mysql root password: 'password'
if: matrix.database == 'mysql'
# image: mariadb:10.3
# env:
# MYSQL_DATABASE: spiff_workflow_webapp_testing
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
# MYSQL_ROOT_PASSWORD:
# ports:
# - 3306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
- name: Run Nox
run: |
nox --force-color --python=${{ matrix.python }}

View File

@ -6,7 +6,7 @@ if os.environ.get("TEST_DATABASE_TYPE") == "sqlite":
SQLALCHEMY_DATABASE_URI = "sqlite:///db_testing.sqlite3"
else:
SQLALCHEMY_DATABASE_URI = (
"mysql+mysqlconnector://root:@localhost/spiff_workflow_webapp_testing"
"mysql+mysqlconnector://root:password@localhost/spiff_workflow_webapp_testing"
)
TESTING = True