Skip to content

Commit

Permalink
WIP [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Dec 6, 2024
1 parent 397c3c3 commit 80870e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run: ## Run arbitrary command.
docker compose run \
docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml run \
--rm \
--entrypoint $(CMD) \
php
Expand All @@ -16,21 +16,21 @@ test-base: testsuite-Db ## Run tests for base db package only.
test-driver-sqlite: testsuite-Sqlite ## Run tests for SQLite driver only.
test-driver-mysql: testsuite-Mysql ## Run tests for MySQL driver only (using MySQL database).
test-driver-mariadb: ## Run tests for MySQL driver only (using MariaDB database).
docker compose run \
docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml run \
--rm \
--entrypoint "vendor/bin/phpunit --testsuite Mysql $(RUN_ARGS)" \
-e YII_MYSQL_TYPE=mariadb \
php
test-driver-pgsql: testsuite-Pgsql ## Run tests for PostgreSQL driver only.
test-driver-mssql: testsuite-Mssql ## Run tests for Microsoft SQL Server driver only.
test-driver-oracle: ## Run tsets for Oracle driver only.
docker compose run \
docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml run \
--rm \
--entrypoint "bash -c -l 'vendor/bin/phpunit --testsuite Oracle $(RUN_ARGS)'" \
php

testsuite-%:
docker compose run \
docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml run \
--rm \
--entrypoint "vendor/bin/phpunit --testsuite $(subst testsuite-,,$@) $(RUN_ARGS)" \
php
Expand Down
8 changes: 4 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ services:
context: ./..
dockerfile: ./docker/Dockerfile
volumes:
- ./src:/code/src
- ./tests:/code/tests
- ./composer.json:/code/composer.json
- ./phpunit.xml.dist:/code/phpunit.xml.dist
- ./../src:/code/src
- ./../tests:/code/tests
- ./../composer.json:/code/composer.json
- ./../phpunit.xml.dist:/code/phpunit.xml.dist
environment:
YII_MYSQL_DATABASE: yii
YII_MYSQL_HOST: mysql
Expand Down
2 changes: 1 addition & 1 deletion docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Clone all repos of drivers' packages:
- [Microsoft SQL Server](https://github.com/yiisoft/db-mssql)
- [Oracle](https://github.com/yiisoft/oracle)

Create `docker-compose.override.yml` file in the root of the package. Add this contents:
Create `docker/docker-compose.override.yml` file with this content:

```yaml
services:
Expand Down

0 comments on commit 80870e8

Please sign in to comment.