-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3060373
commit d3a9f3d
Showing
1 changed file
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
# Unit Testing SQL Queries Using Python | ||
# SQL Unit Testing in Python | ||
|
||
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. | ||
|
||
|
||
## Prerequisites | ||
|
||
- Python 3.12 | ||
- pip | ||
|
||
## Setup | ||
|
||
1. **Clone the repository** | ||
```sh | ||
git clone https://github.com/bernatsort/sql-unit-testing-python.git | ||
cd sql-unit-testing-python | ||
``` | ||
|
||
2. **Create a virtual environment** | ||
```sh | ||
python -m venv venv | ||
source venv/bin/activate # On Windows use `venv\Scripts\activate` | ||
``` | ||
|
||
3. **Install dependencies** | ||
```sh | ||
pip install --upgrade pip | ||
pip install pytest sqlalchemy pandas openpyxl | ||
``` | ||
|
||
## Running the Tests | ||
|
||
- **Run all tests** | ||
```sh | ||
pytest | ||
``` | ||
|
||
## CI/CD Pipeline | ||
|
||
The project uses GitHub Actions for continuous integration. The CI pipeline is configured to: | ||
|
||
1. **Checkout the repository** | ||
2. **Set up Python 3.12** | ||
3. **Install dependencies** | ||
|