Skip to content

ci: add GitHub Actions workflow for lint and import smoke test - #316

Open
dashitongzhi wants to merge 1 commit into
KoljaB:masterfrom
dashitongzhi:ci/add-workflow-20260614091355
Open

ci: add GitHub Actions workflow for lint and import smoke test#316
dashitongzhi wants to merge 1 commit into
KoljaB:masterfrom
dashitongzhi:ci/add-workflow-20260614091355

Conversation

@dashitongzhi

Copy link
Copy Markdown

Summary

This PR adds the project's first GitHub Actions workflow under .github/workflows/ci.yml. The repository previously had a .github/workflows/ directory but no workflow files, so pushes and pull requests were not validated automatically.

The new workflow runs on:

  • push and pull_request against main / master
  • workflow_dispatch (manual trigger from the Actions tab)

It contains two jobs:

  1. Lint (ruff) — runs ruff check . and ruff format --check . against the entire repository on Python 3.11. This catches style regressions and common bug patterns early without requiring reviewers to run lint locally.
  2. Import smoke test — installs the package with pip install -e . --no-deps plus a minimal subset of runtime dependencies (faster-whisper, halo, soundfile, numpy), then verifies that import RealtimeSTT succeeds and setup.py parses. This catches packaging / import-order breakage on every PR without pulling the heavy audio / CUDA stack.

pip caching is enabled via actions/setup-python@v5 to keep runs fast.

Why this option

The repo had an empty .github/workflows/ directory and no CONTRIBUTING.md, CODE_OF_CONDUCT.md, or SECURITY.md. A CI workflow is the highest-leverage first addition: it unblocks future automated checks (typing, tests, builds) and gives contributors an immediate signal when something is broken.

Test Plan

  • Workflow file is valid YAML (lint passed locally)
  • CI passes on first push to the PR branch
  • Actions -> CI -> Run workflow is available from the Actions tab (manual dispatch)
  • ruff check . and ruff format --check . succeed against current main (some existing files may surface warnings; those can be addressed in a follow-up PR or by configuring [tool.ruff] extend-ignore / per-file overrides)

- Add CI workflow (.github/workflows/ci.yml) with workflow_dispatch
  trigger plus push/PR triggers on main and master.
- Run ruff lint and ruff format --check across the repo to catch
  style regressions early.
- Add a lightweight import smoke job that installs the package
  without heavy audio/ML deps to verify package metadata and
  that RealtimeSTT is importable.
- Use Python 3.11 with pip caching to keep CI runs fast and
  reproducible.
Copilot AI review requested due to automatic review settings June 14, 2026 01:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a GitHub Actions CI workflow to run Python linting/format checks via Ruff and a basic import smoke test to catch packaging/import regressions early.

Changes:

  • Introduces a CI workflow triggered on pushes/PRs to main/master plus manual dispatch.
  • Adds a Ruff lint + format-check job.
  • Adds an “import smoke” job that installs selected deps and verifies imports/metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +49 to +54
- name: Install package (no audio deps)
run: |
python -m pip install --upgrade pip
# Skip heavy audio/ML deps; just verify the package tree imports
python -m pip install faster-whisper halo soundfile numpy
python -m pip install -e . --no-deps
Comment thread .github/workflows/ci.yml
Comment on lines +56 to +59
- name: Verify package metadata
run: |
python -c "import RealtimeSTT" && echo "RealtimeSTT import OK"
python -c "import setup; print('setup.py parses OK')"
Comment thread .github/workflows/ci.yml
Comment on lines +27 to +28
- name: Install ruff
run: python -m pip install --upgrade pip ruff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants