Skip to content

chore: add GitHub Actions CI workflow for linting, tests, and securit…#351

Open
Viraj0711 wants to merge 1 commit into
komalharshita:mainfrom
Viraj0711:chore/add-ci-workflow
Open

chore: add GitHub Actions CI workflow for linting, tests, and securit…#351
Viraj0711 wants to merge 1 commit into
komalharshita:mainfrom
Viraj0711:chore/add-ci-workflow

Conversation

@Viraj0711
Copy link
Copy Markdown

@Viraj0711 Viraj0711 commented May 20, 2026

Summary

This PR adds a comprehensive GitHub Actions CI workflow that automatically runs linting, unit tests across multiple Python versions, and security audits on every push and pull request. The workflow ensures code quality, catches regressions early, and prevents merges that fail tests or fail linting checks.

This PR resolves issue #349

Related Issue

Closes #[pending] — Add GitHub Actions workflow to run tests and linters on push and pull requests

Note: Create an issue on GitHub with title "Add GitHub Actions workflow to run tests and linters on push and pull requests" and link it here.

Type of Change

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Data — adds new projects to data/projects.json
  • Documentation — updates docs, README, or code comments only
  • Style — CSS or visual changes only, no logic change
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed

File Change made
.github/workflows/python-ci.yml Added new GitHub Actions workflow with 3 jobs: lint (ruff, black, isort), test (pytest across Python 3.10–3.12 with coverage), security (pip-audit)

How to Test This PR

  1. Clone this branch: git checkout chore/add-ci-workflow
  2. Install dependencies: pip install -r requirements.txt
  3. Run the tests locally: python -m pytest -q
  4. Run linters locally: ruff check ., black --check ., isort --check-only .
  5. Push to GitHub and navigate to the PR — workflow will run automatically in the Actions tab
  6. Verify all three jobs (lint, test, security) pass

Expected test output:

30 passed in 0.20s

Test Results

=============================== test session starts ==============================
platform linux -- Python 3.11.x, pytest-8.2.2, pluggy-1.6.0
rootdir: DevPath
collected 30 items

tests/test_basic.py ..............................                         [100%]

=============================== 30 passed in 0.20s ===============================

Screenshots (if UI change)

N/A — Infrastructure / CI changes, no UI impact.

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: chore/add-ci-workflow
  • I have run python tests/test_basic.py and all 30 tests pass
  • I have not introduced any print() or console.log() debug statements
  • I have not modified files outside the scope of this feature
  • Workflow uses standard GitHub Actions and pinned versions for reproducibility
  • Workflow caches pip to improve CI speed
  • Workflow runs across Python 3.10–3.12 to catch compatibility issues

Notes for Reviewer

  • This workflow runs on push to main and all pull requests to ensure regressions are caught early.
  • The lint job runs first (quick check) before the test matrix, saving CI time if linting fails.
  • Coverage reports are uploaded as artifacts; future work can integrate Codecov or similar.
  • The security job uses pip-audit to scan dependencies for known vulnerabilities.
  • || true on pip-audit allows CI to pass even if vulnerabilities are found (for now); stricter enforcement can be added later.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@Viraj0711 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant