Test Github Actions
This is a simple Python project with a Hello World function and associated tests to demonstrate GitHub Actions CI/CD workflow.
helloworld.py: Contains simple greeting functionstests/test_helloworld.py: Pytest tests for the greeting functions.github/workflows/python-ci.yml: GitHub Actions workflow for running tests
hello_world(): Returns "Hello, World!"greet(name): Returns a personalized greeting "Hello, {name}!"
To run the tests locally:
-
Install pytest:
pip install pytest -
Run the tests:
python -m pytest tests/ -v
This repository uses GitHub Actions to automatically run tests on every push and pull request to the main branch.