Skip to content

Commit

Permalink
Add mysql service
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Nov 19, 2021
1 parent 65e36ab commit 094dbb0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ on:
jobs:
test:
name: 'PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} ${{ matrix.symfony-require }}'

runs-on: ubuntu-20.04

services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: phpcr_odm_tests
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=3

env:
SYMFONY_REQUIRE: ${{ matrix.symfony-require }}

Expand Down
6 changes: 3 additions & 3 deletions cli-config.doctrine_dbal.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ $extraCommands[] = new \Jackalope\Tools\Console\Command\InitDoctrineDbalCommand(

$params = array(
'driver' => 'pdo_mysql',
'host' => 'localhost',
'user' => 'root',
'password' => '',
'host' => 'mysql',
'user' => 'user',
'password' => 'password',
'dbname' => 'phpcr_odm_tests',
);

Expand Down
2 changes: 0 additions & 2 deletions tests/script_doctrine_dbal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ elif test "${SCRIPT_DIR:0:1}" != "/" ; then
SCRIPT_DIR="$PWD/$SCRIPT_DIR"
fi

mysql -e 'create database IF NOT EXISTS phpcr_odm_tests;' -u root

cp ${SCRIPT_DIR}/../cli-config.doctrine_dbal.php.dist ${SCRIPT_DIR}/../cli-config.php
${SCRIPT_DIR}/../bin/phpcrodm jackalope:init:dbal --force
${SCRIPT_DIR}/../bin/phpcrodm doctrine:phpcr:register-system-node-types

0 comments on commit 094dbb0

Please sign in to comment.