Skip to content

Commit df29a78

Browse files
authored
Update README.md
1 parent 990065b commit df29a78

File tree

1 file changed

+73
-1
lines changed

1 file changed

+73
-1
lines changed

README.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,73 @@
1-
## This is the python app for github actions demo....
1+
# Python Application with GitHub Actions CI
2+
3+
This repository contains a simple Python application that demonstrates a basic CI/CD pipeline using GitHub Actions. The project includes basic mathematical operations, unit tests for these operations, and a workflow that automates the testing process.
4+
5+
-----
6+
7+
## 📜 About the Project
8+
9+
This project is set up to showcase a straightforward Python application with an integrated continuous integration (CI) workflow. When code is pushed to the `master` branch or a pull request is created against `master`, the GitHub Actions workflow is automatically triggered.
10+
11+
The core of this project is a simple Python module that performs two basic mathematical operations:
12+
13+
* **Addition**
14+
* **Subtraction**
15+
16+
-----
17+
18+
## ✨ Features
19+
20+
* **Basic Python Application**: Includes a `src` directory with the main application logic. The application currently supports addition and subtraction.
21+
* **Unit Tests**: The `tests` directory contains unit tests written using the `pytest` framework to ensure the reliability of the mathematical operations.
22+
* **Automated CI Pipeline**: A GitHub Actions workflow (`.github/workflows/python-app.yml`) is configured to automatically:
23+
1. Check out the code from the repository.
24+
2. Set up a Python 3.10 environment.
25+
3. Install the required dependencies from the `requirements.txt` file.
26+
4. Run the `pytest` suite to validate the code.
27+
* **Dependency Management**: Project dependencies are managed in the `requirements.txt` file, which includes `pandas` and `pytest`.
28+
29+
-----
30+
31+
## 🚀 Getting Started
32+
33+
### Prerequisites
34+
35+
* Python 3.10 or later
36+
* `pip` for installing packages
37+
38+
### Installation
39+
40+
1. **Clone the repository:**
41+
```sh
42+
git clone https://github.com/rohan-thoma/testing_github_actions.git
43+
cd testing_github_actions
44+
```
45+
2. **Install the dependencies:**
46+
```sh
47+
pip install -r requirements.txt
48+
```
49+
50+
-----
51+
52+
## 🧪 Running the Tests
53+
54+
To run the tests locally, navigate to the root directory of the project and execute the following command:
55+
56+
```sh
57+
pytest
58+
```
59+
60+
The tests will verify the correctness of the `add` and `sub` functions in the `src.math_operations` module.
61+
62+
-----
63+
64+
## 🤖 Continuous Integration
65+
66+
This project uses **GitHub Actions** for its CI pipeline. The workflow is defined in the `.github/workflows/python-app.yml` file and is triggered on every `push` and `pull_request` to the `master` branch.
67+
68+
The CI pipeline performs the following steps:
69+
70+
1. **Checkout Code**: The first step checks out the repository's code.
71+
2. **Set up Python**: It sets up the Python 3.10 environment.
72+
3. **Install Dependencies**: It installs all the necessary dependencies from the `requirements.txt` file.
73+
4. **Run Tests**: Finally, it runs the test suite using `pytest` to ensure that the changes have not introduced any regressions.

0 commit comments

Comments
 (0)