Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Oct 24, 2024
1 parent d308094 commit ee5cef6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ RUN apt-get update && apt-get install -y unzip libaio1
# RUN echo 'instantclient,/usr/local/instantclient' | pecl install pdo_oci
# RUN echo "extension=pdo_oci.so" > /usr/local/etc/php/conf.d/php-pdo-oci.ini

RUN docker-php-ext-install pdo_mysql
RUN apt-get update && apt-get install -y libpq-dev
RUN docker-php-ext-install pdo_mysql pdo_pgsql

# Composer

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test-all: vendor/bin/phpunit --testsuite Sqlite,Mysql,Pgsql,Mssql,Oracle
test-mysql: vendor/bin/phpunit --testsuite Mysql
test-pgsql: vendor/bin/phpunit --testsuite Pgsql
test-oracle: vendor/bin/phpunit --testsuite Oracle
test-temp: vendor/bin/phpunit --testsuite Mysql --filter testOffset tests/Mysql/QueryDataReaderTest.php
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
depends_on:
mysql:
condition: service_healthy
postgres:
condition: service_healthy
mysql:
image: mysql:9
ports:
Expand All @@ -25,6 +27,22 @@ services:
interval: 5s
timeout: 5s
retries: 20
postgres:
image: postgres:17
ports:
- "5432:5432"
volumes:
- type: tmpfs
target: /var/lib/postgresql/data
environment:
POSTGRES_DB: yii
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
oracle:
image: gvenzl/oracle-xe:21
ports:
Expand Down
4 changes: 2 additions & 2 deletions tests/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ YII_MYSQL_USER=root
YII_MYSQL_PASSWORD=root

YII_PGSQL_DATABASE=yii
YII_PGSQL_HOST=127.0.0.1
YII_PGSQL_PORT=15432
YII_PGSQL_HOST=postgres
YII_PGSQL_PORT=5432
YII_PGSQL_USER=postgres
YII_PGSQL_PASSWORD=postgres

Expand Down

0 comments on commit ee5cef6

Please sign in to comment.