Skip to content

Commit

Permalink
Update file
Browse files Browse the repository at this point in the history
  • Loading branch information
luizcmarin committed Apr 20, 2024
1 parent 58b08cf commit 7491523
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 207 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ This allows you to log cache operations, when ocurring errors, etc.

## Documentation

Testing:

- [English](docs/guide/en/testing.md)
- [Portuguese - Brazil](docs/guide/pt-BR/testing.md)
- More information can be found in the [Internals.](docs/internals.md)

## Support
Expand All @@ -173,7 +169,7 @@ You may also check out other [Yii Community Resources](https://www.yiiframework.

## License

The Yii Access is free software. It is released under the terms of the BSD License.
The Yii Cache Library - DB Handler is free software. It is released under the terms of the BSD License.
Please see [`LICENSE`](./LICENSE.md) for more information.

Maintained by [Yii Software](https://www.yiiframework.com/).
101 changes: 0 additions & 101 deletions docs/guide/en/testing.md

This file was deleted.

101 changes: 0 additions & 101 deletions docs/guide/pt-BR/testing.md

This file was deleted.

62 changes: 62 additions & 0 deletions docs/internals.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Internals

This package can be tested globally or individually for each DBMS.

- [MSSQL](https://github.com/yiisoft/db-mssql)
- [MySQL/MariaDB](https://github.com/yiisoft/db-mysql)
- [Oracle](https://github.com/yiisoft/db-oracle)
- [PostgreSQL](https://github.com/yiisoft/db-pgsql)
- [SQLite](https://github.com/yiisoft/db-sqlite)

## Github actions

All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/cache-db/blob/master/.github/CONTRIBUTING.md) in the cloud.

> Note: We recommend pull requesting in draft mode until all tests pass.
## Docker images

For greater ease it is recommended to use Docker containers for each DBMS, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that in the root directory of each package.

- [MSSQL 2022](https://github.com/yiisoft/db-mssql/blob/master/docker-compose.yml)
- [MySQL 8](https://github.com/yiisoft/db-mysql/blob/master/docker-compose.yml)
- [MariaDB 10.11](https://github.com/yiisoft/db-mysql/blob/master/docker-compose-mariadb.yml)
- [Oracle 21](https://github.com/yiisoft/db-oracle/blob/master/docker-compose.yml)
- [PostgreSQL 15](https://github.com/yiisoft/db-pgsql/blob/master/docker-compose.yml)

For running the Docker containers you can use the following command:

```dockerfile
docker compose up -d
```

## Unit testing

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
Expand All @@ -8,6 +38,38 @@ The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
./vendor/bin/phpunit
```

## Global testing

The following steps are required to run the tests.

1. Run all Docker containers for each dbms.
2. Install the dependencies of the project with composer.
3. Run the tests.

```shell
vendor/bin/phpunit
```

## Individual testing

The following steps are required to run the tests.

1. Run the Docker container for the dbms you want to test.
2. Install the dependencies of the project with composer.
3. Run the tests.

```shell
vendor/bin/phpunit --testsuite=Pgsql
```

Suites available:

- Mssql
- Mysql
- Oracle
- Pgsql
- Sqlite

## Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
Expand Down

0 comments on commit 7491523

Please sign in to comment.