Skip to content

ci: modernize GitHub Actions workflows, labelers, and issue templates to production grade - #1931

Merged
komalharshita merged 1 commit into
komalharshita:mainfrom
santusht06:fix/cicd-pipeline-and-workflow-modernization
Sep 19, 2026
Merged

komalharshita merged 1 commit into
komalharshita:mainfrom
santusht06:fix/cicd-pipeline-and-workflow-modernization

Conversation

@santusht06

Copy link
Copy Markdown
Contributor

Summary [required]

This PR modernizes and hardens the GitHub Actions CI/CD pipeline, PR/issue automated triage workflows, and labeler configuration for DevPath:

  1. CI Pipeline Hardening (python-app.yml): Adds pip caching via actions/setup-python@v7, introduces blocking syntax/fatal error checks (E9,F63,F7,F82), undefined variable checks (F821), advisory style checks, and verbose test execution with pytest.
  2. Workflow Streamlining & Permissions:
    • Consolidates PR title regex and file-based labeling across .github/workflows/auto-label-prs.yml, .github/workflows/auto-file-labels.yml, and .github/labeler.yml.
    • Cleans up issue creation triage in .github/workflows/issue-management.yml to safely auto-assign creators and attach program labels without failing on non-member permissions.
    • De-duplicates redundant issue labeling logic (auto-label-issues.yml).
  3. Issue Template Placement: Moves config.yml under .github/ISSUE_TEMPLATE/ so GitHub correctly recognizes blank issue restrictions and contact links.
  4. Stale Automation (stale.yml): Introduces a scheduled maintenance workflow (actions/stale@v9) to automatically triage inactive issues and pull requests while exempting security, pinned, and in-progress items.
  5. Test Suite Hygiene (tests/test_admin_csrf.py): Wraps CSRF enablement mutations in try...finally blocks to guarantee test state isolation and prevent state leakage across test runs.

Type of Change [required]

  • Bug fix — resolves broken/redundant workflow behavior and test state leaks
  • Refactor — restructures and modernizes CI/CD pipelines
  • Test — hardens CSRF test teardown

What Was Changed [required]

File Change made
.github/workflows/python-app.yml Added pip caching, blocking syntax checks (E9,F63,F7,F82), and verbose pytest runner
.github/workflows/auto-label-prs.yml Modernized PR title categorization regex and label mappings
.github/workflows/auto-file-labels.yml Updated file labeler trigger and permissions
.github/workflows/issue-management.yml Safe creator auto-assignment and GSSoC-2026 label assignment with error handling
.github/workflows/auto-label-issues.yml Removed redundant duplicate workflow
.github/workflows/stale.yml Added daily scheduled workflow to triage inactive issues/PRs
.github/labeler.yml Added comprehensive file matching patterns across src/, data/, docs/, and tests/
.github/ISSUE_TEMPLATE/config.yml Relocated into ISSUE_TEMPLATE/ for proper GitHub issue form rendering
.github/ISSUE_TEMPLATE/data_contribution.yml Refined default label configuration
.github/workflows/deploy.yml Added explicit permissions configuration
tests/test_admin_csrf.py Wrapped WTF_CSRF_ENABLED test configurations in try...finally teardowns

How to Test This PR [required]

  1. Clone this branch: git checkout fix/cicd-pipeline-and-workflow-modernization
  2. Install dependencies: pip install -r requirements.txt && pip install -r requirements-dev.txt
  3. Run tests with pytest: PYTHONPATH=src pytest -v
  4. Run syntax and fatal error checks: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

Expected test output:

664 passed, 4 skipped in 5.70s

Test Results [required]

======================== 664 passed, 4 skipped in 5.70s ========================

Self-Review Checklist [required]

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: fix/
  • All test suites pass (664 passed)
  • No print() or console.log() debug statements introduced
  • Tested locally on Python 3.11 / 3.12

… to production grade

- Add pip dependency caching to python-app.yml and deploy.yml for 30-60s faster CI runs
- Add blocking syntax and undefined name checks (E9, F63, F7, F82, F821) to CI
- Fix YAML syntax parsing error in .github/ISSUE_TEMPLATE/data_contribution.yml
- Move .github/config.yml to .github/ISSUE_TEMPLATE/config.yml to activate issue chooser settings
- Consolidate auto-label-issues.yml into issue-management.yml, removing fragile body text regexing
- Upgrade auto-label-prs.yml to support both branch ref patterns and conventional commit PR titles
- Add sync-labels: false to auto-file-labels.yml to prevent wiping existing PR labels
- Expand labeler.yml path coverage for backend, frontend, database, docs, test, and ci/cd
- Add .github/workflows/stale.yml for automated stale issue and PR lifecycle management
- Fix test_admin_csrf.py to restore WTF_CSRF_ENABLED in finally block, preventing test pollution
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

@santusht06 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.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working labels Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

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.

@komalharshita
komalharshita merged commit 3c6aefb into komalharshita:main Sep 19, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants