Skip to content

Commit d3a9f3d

Browse files
committed
readme.md
1 parent 3060373 commit d3a9f3d

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

README.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
# Unit Testing SQL Queries Using Python
1+
# SQL Unit Testing in Python
2+
3+
This project demonstrates how to perform unit testing for SQL queries using Python. The goal is to ensure the accuracy and reliability of SQL logic used in data processing and analytics. The project leverages pytest for testing, SQLAlchemy for database interaction, and GitHub Actions for CI/CD.
4+
5+
6+
## Prerequisites
7+
8+
- Python 3.12
9+
- pip
10+
11+
## Setup
12+
13+
1. **Clone the repository**
14+
```sh
15+
git clone https://github.com/bernatsort/sql-unit-testing-python.git
16+
cd sql-unit-testing-python
17+
```
18+
19+
2. **Create a virtual environment**
20+
```sh
21+
python -m venv venv
22+
source venv/bin/activate # On Windows use `venv\Scripts\activate`
23+
```
24+
25+
3. **Install dependencies**
26+
```sh
27+
pip install --upgrade pip
28+
pip install pytest sqlalchemy pandas openpyxl
29+
```
30+
31+
## Running the Tests
32+
33+
- **Run all tests**
34+
```sh
35+
pytest
36+
```
37+
38+
## CI/CD Pipeline
39+
40+
The project uses GitHub Actions for continuous integration. The CI pipeline is configured to:
41+
42+
1. **Checkout the repository**
43+
2. **Set up Python 3.12**
44+
3. **Install dependencies**
45+

0 commit comments

Comments
 (0)