This repository serves as a simple demonstration of Continuous Integration (CI) and Continuous Deployment (CD) using GitHub Actions and a Python script.
The main goal of this project is to showcase how to set up a basic CI/CD pipeline using GitHub Actions. The repository contains a single Python script, main.py
, which performs a basic operation. The CI/CD workflow is triggered automatically on each push to the main branch.
The CI/CD workflow in this project consists of the following steps:
- Build: Checks out the code and sets up the Python environment.
- Test: Runs unit tests on the Python script to ensure its functionality.
- Deploy: If the tests pass, deploys the Python script or its artifacts. (Note: In this example, deployment is kept minimal.)
The workflow configuration is defined in the .github/workflows/main.yml
file.
To run this CI/CD example locally or integrate it into your own project, follow these steps:
-
Clone the Repository:
git clone https://github.com/your-username/CI-CD.git cd CI-CD
-
Run the Python Script:
python main.py
-
Explore GitHub Actions:
- Open the Actions tab in your GitHub repository to view CI/CD workflow runs.
- Review the workflow configuration in
.github/workflows/main.yml
to understand the pipeline.
-
Customize as Needed:
- Modify the workflow, script, or other components based on your project requirements.
If you find issues or have suggestions for improvements, feel free to open an issue or create a pull request. Contributions are welcome!
This project is licensed under the MIT License.