Skip to content

Add GitHub Actions workflow to run tests and linters on push and pull requests #349

@Viraj0711

Description

@Viraj0711

Currently there is no CI configured for this repository. That allows regressions, style drift, or failing tests to be merged unnoticed. Adding a GitHub Actions workflow to run tests and linters on push and pull_request will catch regressions early and improve contributor confidence.

What to add:

Create .github/workflows/python-ci.yml with a job that:

Runs on push and pull_request.
Uses a matrix for Python versions (e.g., 3.10, 3.11).
Checks out code, sets up Python, installs pinned deps from requirements.txt (cache pip), installs dev tools (e.g., pytest, flake8/ruff).
Runs pytest and a linter (e.g., flake8 or ruff).
Files/places to check

test_basic.py — ensure tests run under the workflow.
requirements.txt — ensure test/dev deps are available or installed in the workflow.

Expected behavior:

On every push and PR, the workflow installs dependencies and runs tests and linter.
The workflow fails the run if tests or linter fail, preventing merges without fixes.

Suggested implementation steps:

Add .github/workflows/python-ci.yml (example below).
Update [requirements.txt] or install dev tools in the workflow.
Add CI status badge to [README.md].

Labels: ci, automation
Estimated difficulty: medium (low if tests already pass locally)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions