Skip to main content

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.

The project uses a GitHub Actions CI/CD workflow (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

PropertyValue
Trigger eventspush and pull_request
Target branchesmain, dev
Runnerubuntu-latest
Python version3.12
The workflow uses a 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:
name: CI

on:
  push:
    branches: [main, dev]
  pull_request:
    branches: [main, dev]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.12"]

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt

      - name: Run tests
        run: pytest -v

Pipeline steps

1

Checkout code

Uses actions/checkout@v3 to clone the repository into the runner’s workspace, making the full source tree available to subsequent steps.
2

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.
3

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.
python -m pip install --upgrade pip
pip install -r requirements.txt
4

Run tests

Executes the full test suite with verbose output. A non-zero exit code from pytest causes the workflow run to fail, blocking any merge until the suite is green.
pytest -v

Badge

Add the following badge to the top of your README.md to display the live CI status for the main branch:
[![CI/CD](https://github.com/WorkTeam01/team-practice/actions/workflows/ci.yml/badge.svg)](https://github.com/WorkTeam01/team-practice/actions/workflows/ci.yml)
The badge turns green when the most recent run on 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.
Open the Actions tab on the GitHub repository page to browse the full history of workflow runs, inspect step-by-step logs, and download artifacts. Each run links back to the exact commit that triggered it, making it easy to pinpoint when a regression was introduced.

Build docs developers (and LLMs) love