The project uses a GitHub Actions CI/CD workflow (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/WorkTeam01/team-practice/llms.txt
Use this file to discover all available pages before exploring further.
ci.yml) that automatically runs all tests on every push and pull request targeting main or dev. Every commit that lands on either branch — or opens a pull request against them — triggers a clean Ubuntu environment, installs dependencies, and executes the full pytest suite, giving the team immediate feedback on whether a change breaks existing functionality.
Workflow overview
| Property | Value |
|---|---|
| Trigger events | push and pull_request |
| Target branches | main, dev |
| Runner | ubuntu-latest |
| Python version | 3.12 |
strategy.matrix to define the Python version, making it straightforward to expand to additional Python versions in the future by adding entries to the matrix list.
Workflow file
The complete workflow definition lives at.github/workflows/ci.yml:
Pipeline steps
Checkout code
Uses
actions/checkout@v3 to clone the repository into the runner’s workspace, making the full source tree available to subsequent steps.Set up Python 3.12
Uses
actions/setup-python@v4 with python-version sourced from the matrix ("3.12"). This installs the specified CPython release and adds it to the runner’s PATH.Install dependencies
Upgrades
pip to the latest version and then installs all packages declared in requirements.txt (currently pytest>=7.0.0). Upgrading pip first ensures reliable resolution of any version constraints.Badge
Add the following badge to the top of yourREADME.md to display the live CI status for the main branch:
main passed and red when it failed, giving visitors an at-a-glance health indicator.
Headless test execution
The calculator’s GUI is built with tkinter, which normally requires an active display (Tcl/Tk) to instantiate widgets — a resource that Ubuntu GitHub Actions runners do not provide. The test suite works around this entirely in Python:tests/conftest.py defines four dummy classes (DummyRoot, DummyEntry, DummyButton, DummyLabel) and an autouse=True fixture that swaps out the real tk.Tk, tk.Entry, tk.Button, and tk.Label with those dummies before each test.
Because the substitution happens at the Python object level — monkey-patching the tkinter module attributes — the CalculatorGUI class instantiates and operates normally in CI without ever making a Tcl/Tk system call. No xvfb, no virtual framebuffer, no OS-level display dependency.
The workflow file is located at
.github/workflows/ci.yml in the repository root. It is configured to trigger on both the main and dev branches, so integration work on dev is validated by CI before it is ever merged to main.