diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 80f40176..63c9ee1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -147,6 +147,24 @@ jobs: key: ${{ steps.pre-commit-cache.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }} 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: | diff --git a/src/spiff_workflow_webapp/config/testing.py b/src/spiff_workflow_webapp/config/testing.py index a9a5d063..5e3dcb7c 100644 --- a/src/spiff_workflow_webapp/config/testing.py +++ b/src/spiff_workflow_webapp/config/testing.py @@ -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