This is a demo Python project designed to showcase a CI/CD pipeline for Python projects. It includes:
- Unit tests with pytest.
- Integration tests.
- Linting with flake8 (see the
lint
target in the Makefile). - A build step to package the project.
It's recommended to create a virtualenv first:
python3 -m venv venv
source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run tests:
make test
make lint
-
Build a release wheel:
make build
/
├── .gitignore
├── Makefile
├── README.md
├── requirements.txt
├── setup.py
├── demo_project
│ ├── __init__.py
│ └── calculator.py
└── tests
├── __init__.py
├── test_calculator_integration.py
└── test_calculator_unit.py
- Fork this repository.
- Clone the repository to your machine.
- Add the repository in your Semaphore account
- Choose "I will use existing configuration"
- Make a small change (e.g.
README.md
file add a blank line) - Commit and push the change to your repository
- Discuss why the pipeline is failing
- Fix the pipeline