Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit c5e0068

Browse files
committed
remove docker file, update contributing docs
1 parent 94fab6e commit c5e0068

File tree

3 files changed

+34
-33
lines changed

3 files changed

+34
-33
lines changed

docs/contributing.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,40 @@ run all of those with lint script
6666
2. The simples one is for sqlite alone: `sqlite:///test.db`
6767

6868
3. Prepare tests (all backends)
69-
1. In order to run all backends you need a docker instalation on your system [from here](https://docs.docker.com/get-docker/)
70-
2. You need to set-up `TEST_IN_DOCKER` env variable (to any non-null value `YES` or `1`)
69+
1. In order to run all backends you need either a docker installation on your system or all supported backends servers installed on your local machine.
70+
2. A sample docker configuration that reflects the CI/CD workflow of databases might be:
71+
72+
```dockerfile
73+
version: '2.1'
74+
services:
75+
postgres:
76+
image: postgres:10.8
77+
environment:
78+
POSTGRES_USER: username
79+
POSTGRES_PASSWORD: password
80+
POSTGRES_DB: testsuite
81+
ports:
82+
- 5432:5432
83+
84+
mysql:
85+
image: mysql:5.7
86+
environment:
87+
MYSQL_USER: username
88+
MYSQL_PASSWORD: password
89+
MYSQL_ROOT_PASSWORD: password
90+
MYSQL_DATABASE: testsuite
91+
ports:
92+
- 3306:3306
93+
```
94+
3. To test all backends, the test urls need to consist of all possible drivers too, so a sample might look like following:
95+
```text
96+
sqlite:///test.db,
97+
sqlite+aiosqlite:///test.db,
98+
mysql+aiomysql://username:password@localhost:3306/testsuite,
99+
mysql+asyncmy://username:password@localhost:3306/testsuite,
100+
postgresql+aiopg://username:[email protected]:5432/testsuite,
101+
postgresql+asyncpg://username:password@localhost:5432/testsuite
102+
```
71103

72104
4. Run tests
73105
```bash

scripts/docker-compose.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

scripts/test

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ if [ -z "$TEST_DATABASE_URLS" ] && [ -z "${TEST_IN_DOCKER+x}" ]; then
1010
exit 1
1111
fi
1212

13-
if [ -n "${TEST_IN_DOCKER+x}" ]; then
14-
docker-compose -f ./scripts/docker-compose.yml up -d
15-
export TEST_DATABASE_URLS="sqlite:///test.db,
16-
sqlite+aiosqlite:///test.db,
17-
mysql+aiomysql://username:password@localhost:3306/testsuite,
18-
mysql+asyncmy://username:password@localhost:3306/testsuite,
19-
postgresql+aiopg://username:[email protected]:5432/testsuite,
20-
postgresql+asyncpg://username:password@localhost:5432/testsuite
21-
"
22-
fi
23-
2413
set -ex
2514

2615
if [ -z $GITHUB_ACTIONS ]; then

0 commit comments

Comments
 (0)