Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Dec 2, 2024
1 parent c7e8975 commit d03a8c2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM composer/composer:latest-bin AS composer

FROM php:8.3-cli as php
FROM php:8.3-cli

# System packages

Expand Down
39 changes: 19 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
run:
docker compose run --user root --rm --entrypoint $(CMD) php
docker compose run \
--rm \
--entrypoint $(CMD) \
php

test-all: test-sqlite \
test-mysql \
test-mariadb \
test-pgsql \
test-mssql \
test-oracle
test-sqlite: testsuite-Sqlite
test-mysql: testsuite-Mysql
test-mariadb:
test-driver-all: test-driver-sqlite \
test-driver-mysql \
test-driver-mariadb \
test-driver-pgsql \
test-driver-mssql \
test-driver-oracle
test-driver-sqlite: testsuite-Sqlite
test-driver-mysql: testsuite-Mysql
test-driver-mariadb:
docker compose run \
--rm \
--entrypoint "vendor/bin/phpunit --testsuite Mysql" \
--entrypoint "vendor/bin/phpunit --testsuite Mysql $(RUN_ARGS)" \
-e YII_MYSQL_TYPE=mariadb \
php
test-pgsql: testsuite-Pgsql
test-mssql: testsuite-Mssql
test-oracle:
test-driver-pgsql: testsuite-Pgsql
test-driver-mssql: testsuite-Mssql
test-driver-oracle:
docker compose run \
--user root \
--workdir /code \
--rm \
--entrypoint "bash -c -l 'vendor/bin/phpunit --testsuite Oracle $(RUN_ARGS)'" \
php-oracle
php

testsuite-%:
docker compose run \
--rm \
--entrypoint "vendor/bin/phpunit --testsuite $(subst testsuite-,,$@)" \
--entrypoint "vendor/bin/phpunit --testsuite $(subst testsuite-,,$@) $(RUN_ARGS)" \
php

# --filter showDatabases vendor/yiisoft/db-mssql/tests/CommandTest.php

static-analysis: CMD="vendor/bin/psalm --no-cache"
static-analysis: run

Expand Down
4 changes: 4 additions & 0 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Suites available:
- Pgsql
- Sqlite

```shell
make test-oracle RUN_ARGS="--group temp"
```

## Static analysis

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
Expand Down

0 comments on commit d03a8c2

Please sign in to comment.