Skip to content

Commit

Permalink
Setting up MySql & Posgres for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rotimi committed Feb 22, 2024
1 parent 4b8d942 commit 86eb37b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,35 @@ jobs:
#exclude:
#- os: ubuntu-20.04
#php: 7.3
mysql-version:
- "8.0"
pgsql-version:
- "14"

services:
postgres:
image: postgres:${{ matrix.pgsql-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
#POSTGRES_DB: test
ports:
- 5432:5432
#- 15432:5432
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3

name: PHP-${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
mysql:
image: mysql:${{ matrix.mysql-version }}
env:
MYSQL_ROOT_PASSWORD: root
#MYSQL_DATABASE: spiral
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
ports:
- 3306:3306
#- 13306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

name: PHP-${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - ${{ matrix.mysql-version }} - ${{ matrix.pgsql-version }}

steps:
- name: Checkout code
Expand All @@ -45,6 +72,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, intl, mbstring, pdo, pdo_pgsql, pdo_mysql
ini-values: pcre.jit=0, pcre.backtrack_limit=9999999, pcre.recursion_limit=9999999
coverage: xdebug

Expand Down
8 changes: 3 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@
</logging>

<php>
<!--

<var name="Rotexsoft_SqlSchema_Setup_MysqlSetup__dsn" value="mysql:host=127.0.0.1" />
<var name="Rotexsoft_SqlSchema_Setup_MysqlSetup__username" value="root" />
<var name="Rotexsoft_SqlSchema_Setup_MysqlSetup__password" value="" />
<var name="Rotexsoft_SqlSchema_Setup_MysqlSetup__password" value="root" />

<var name="Rotexsoft_SqlSchema_Setup_PgsqlSetup__dsn" value="pgsql:host=127.0.0.1;dbname=test" />
<var name="Rotexsoft_SqlSchema_Setup_PgsqlSetup__username" value="postgres" />
<var name="Rotexsoft_SqlSchema_Setup_PgsqlSetup__password" value="" />
<var name="Rotexsoft_SqlSchema_Setup_PgsqlSetup__password" value="root" />

-->

<var name="Rotexsoft_SqlSchema_Setup_SqliteSetup__dsn" value="sqlite::memory:" />
<var name="Rotexsoft_SqlSchema_Setup_SqliteSetup__username" value="" />
Expand Down

0 comments on commit 86eb37b

Please sign in to comment.