You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+82-45Lines changed: 82 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,21 @@ Thank you for considering a contribution to sqlit! This guide walks you through
15
15
pip install -e ".[dev]"
16
16
```
17
17
18
+
For the full integration suite (all database drivers):
19
+
```bash
20
+
pip install -e ".[dev,all]"
21
+
```
22
+
18
23
## Running Tests
19
24
25
+
### CLI E2E Tests
26
+
27
+
CLI end-to-end tests run the entrypoint in a subprocess:
28
+
29
+
```bash
30
+
pytest tests/cli/ -v
31
+
```
32
+
20
33
### SQLite Tests (No Docker Required)
21
34
22
35
SQLite tests can run without any external dependencies:
@@ -27,33 +40,43 @@ pytest tests/ -v -k sqlite
27
40
28
41
### Full Test Suite (Requires Docker)
29
42
30
-
To run the complete test suite including SQL Server, PostgreSQL, MySQL, MariaDB, FirebirdSQL, Oracle, DuckDB, and CockroachDB tests:
43
+
To run the complete test suite including SQL Server, PostgreSQL, MySQL, MariaDB, FirebirdSQL, Oracle, ClickHouse, Turso (libsql), D1 (miniflare), SSH tunnel, DuckDB, CockroachDB, and Flight SQL tests:
31
44
32
45
1. Start the test database containers:
33
46
```bash
34
-
docker compose -f docker-compose.test.yml up -d
47
+
docker compose -f infra/docker/docker-compose.test.yml up -d
48
+
```
49
+
To include the enterprise test containers (Db2, Trino, Presto, Oracle 11g):
50
+
```bash
51
+
docker compose -f infra/docker/docker-compose.test.yml --profile enterprise up -d
35
52
```
36
53
37
54
2. Wait for the databases to be ready (about 30-45 seconds), then run tests:
38
55
```bash
39
56
pytest tests/ -v
40
57
```
41
58
59
+
To include Docker detection tests that spin up temporary containers:
You can leave the containers running between test runs - the test fixtures handle database setup/teardown automatically. Stop them when you're done developing:
43
65
44
66
```bash
45
-
docker compose -f docker-compose.test.yml down
67
+
docker compose -f infra/docker/docker-compose.test.yml down
46
68
```
47
69
48
70
### Running Tests for Specific Databases
49
71
50
72
```bash
51
-
pytest tests/ -v -k sqlite # SQLite only
52
-
pytest tests/ -v -k mssql # SQL Server only
53
-
pytest tests/ -v -k PostgreSQL # PostgreSQL only
54
-
pytest tests/ -v -k MySQL # MySQL only
55
-
pytest tests/ -v -k cockroach # CockroachDB only
56
-
pytest tests/ -v -k firebird # FirebirdSQL only
73
+
pytest tests/ -v -k sqlite
74
+
pytest tests/ -v -k mssql
75
+
pytest tests/ -v -k PostgreSQL
76
+
pytest tests/ -v -k MySQL
77
+
pytest tests/ -v -k cockroach
78
+
pytest tests/ -v -k firebird
79
+
pytest tests/ -v -k flight
57
80
```
58
81
59
82
### Environment Variables
@@ -110,35 +133,57 @@ The database tests can be configured with these environment variables:
110
133
|`AWS_PROFILE`|`default`| AWS CLI profile to use (must be configured in `~/.aws/credentials`) |
111
134
|`AWS_REGION`|`us-east-1`| AWS Region |
112
135
113
-
### CockroachDB Quickstart (Docker)
114
-
115
-
1. Start the included CockroachDB container:
116
-
```bash
117
-
docker compose -f docker-compose.test.yml up -d cockroachdb
118
-
```
119
-
2. Create a connection (default container runs insecure mode on port `26257` with `root` user):
120
-
```bash
121
-
sqlit connection create \
122
-
--name "LocalCockroach" \
123
-
--db-type cockroachdb \
124
-
--server "localhost" \
125
-
--port "26257" \
126
-
--database "defaultdb" \
127
-
--username "root"
128
-
```
129
-
3. Launch sqlit and connect:
130
-
```bash
131
-
sqlit
132
-
```
133
-
134
-
## CI/CD
135
-
136
-
The project uses GitHub Actions for continuous integration:
0 commit comments