Skip to content

feat: Add smoke tests workflow for PR validation#9125

Merged
Yukiyukiyeah merged 20 commits into
mainfrom
feature/add-smoke-tests
Jul 28, 2025
Merged

feat: Add smoke tests workflow for PR validation#9125
Yukiyukiyeah merged 20 commits into
mainfrom
feature/add-smoke-tests

Conversation

@Yukiyukiyeah
Copy link
Copy Markdown
Contributor

@Yukiyukiyeah Yukiyukiyeah commented Jul 21, 2025

  • Adds smoke-test label trigger for running tests without API keys
  • Runs backend tests excluding api_key_required markers
  • Runs full frontend test suite with mocked APIs
  • Provides fast feedback (~10-15 min) before lgtm label
  • Enables external contributors to validate changes without API costs
  • Comments results back to PR automatically

Usage: Add 'smoke-test' label to any PR to trigger

Summary by CodeRabbit

  • Chores
    • Introduced an automated "Smoke Tests" workflow that runs backend and frontend smoke tests on pull requests labeled with "smoke-test", and posts a summary comment with results and coverage details.

- Adds smoke-test label trigger for running tests without API keys
- Runs backend tests excluding api_key_required markers
- Runs full frontend test suite with mocked APIs
- Provides fast feedback (~10-15 min) before lgtm label
- Enables external contributors to validate changes without API costs
- Comments results back to PR automatically

Usage: Add 'smoke-test' label to any PR to trigger

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 21, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

A new GitHub Actions workflow named "Smoke Tests" has been added. It is triggered when a pull request receives a label containing "smoke-test". The workflow runs both backend and frontend smoke tests, skips tests requiring API keys, and posts a summary comment with results and a link to the workflow run.

Changes

File(s) Change Summary
.github/workflows/smoke-tests.yml Added a new GitHub Actions workflow for automated smoke testing on labeled pull requests.

Estimated code review effort

1 (~2 minutes)

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-smoke-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 21, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
.github/workflows/smoke-tests.yml (3)

20-24: Consider pinning to a stable Python version

The repo previously ran on 3.10; upgrading CI to 3.12 may surface wheels that aren’t yet published (e.g., psycopg2, chromadb, etc.). If full 3.12 support isn’t guaranteed, switch to the project’s current minimum-supported version or make the version a build matrix.


30-33: uv sync --dev installs all dev dependencies

If the smoke tests are meant to be lightweight, installing heavy tooling (linters, docs, notebooks, etc.) lengthens the job. Use --groups "default,test" (or equivalent poetry-style groups) to pull only what tests need, or maintain a dedicated requirements-smoke.lock.


47-52: Node 21 is experimental – prefer the current LTS (20)

GitHub’s setup-node action defaults to LTS (20.x) for good reason: smaller download, better cache hit-rate, and fewer sudden breaks. Unless you truly need 21-specific features, switch to node-version: "20".

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3bb22b2 and 93dc6b0.

📒 Files selected for processing (1)
  • .github/workflows/smoke-tests.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/smoke-tests.yml (1)

Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-21T14:16:14.092Z
Learning: Applies to src/backend/tests/**/*.py : Test flows using predefined JSON data and utility functions such as 'create_flow', 'build_flow', 'get_build_events', and 'consume_and_assert_stream' in backend Python tests.

🪛 actionlint (1.7.7)
.github/workflows/smoke-tests.yml

82-82: could not parse as YAML: yaml: line 82: could not find expected ':'

(syntax-check)

🪛 YAMLlint (1.37.1)
.github/workflows/smoke-tests.yml

[error] 84-84: syntax error: could not find expected ':'

(syntax)

Comment on lines +65 to +94
- name: Comment on PR with results
if: always()
uses: actions/github-script@v6
with:
script: |
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});

const conclusion = '${{ job.status }}';
const emoji = conclusion === 'success' ? '✅' : '❌';
const status = conclusion === 'success' ? 'passed' : 'failed';

const comment = `${emoji} **Smoke tests ${status}**

Tests ran without API keys - covers ~90% of functionality.

- Backend tests: Skipped API-dependent tests
- Frontend tests: Full test suite with mocked APIs

View details in the [Actions tab](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`;

await github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
}); No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Workflow fails to parse – improper indentation inside the script block

actionlint/yamllint rightly complain: the lines that belong to the JS template literal (Tests ran without … and the two bullet points) aren’t indented as part of the YAML literal that started with script: |.
Because YAML considers indentation significant, the current file will be rejected by the runner and the job will never start.

Quick fix:

-            const comment = `${emoji} **Smoke tests ${status}**
-
-Tests ran without API keys - covers ~90% of functionality.
-
-- Backend tests: Skipped API-dependent tests
-- Frontend tests: Full test suite with mocked APIs
-
-View details in the [Actions tab](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`;
+            const comment = `${emoji} **Smoke tests ${status}**
+            
+            Tests ran without API keys – covers ~90% of functionality.
+            
+            - Backend tests: _API-dependent tests skipped_
+            - Frontend tests: _full suite with mocked APIs_
+            
+            View details in the [Actions tab](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`;

Every line stays indented the same as the opening const statement – YAML is now happy.
Alternatively escape newlines (\n) inside the string to avoid indentation concerns altogether.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Comment on PR with results
if: always()
uses: actions/github-script@v6
with:
script: |
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});
const conclusion = '${{ job.status }}';
const emoji = conclusion === 'success' ? '✅' : '';
const status = conclusion === 'success' ? 'passed' : 'failed';
const comment = `${emoji} **Smoke tests ${status}**
Tests ran without API keys - covers ~90% of functionality.
- Backend tests: Skipped API-dependent tests
- Frontend tests: Full test suite with mocked APIs
View details in the [Actions tab](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`;
await github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
- name: Comment on PR with results
if: always()
uses: actions/github-script@v6
with:
script: |
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});
const conclusion = '${{ job.status }}';
const emoji = conclusion === 'success' ? '✅' : '';
const status = conclusion === 'success' ? 'passed' : 'failed';
const comment = `${emoji} **Smoke tests ${status}**
Tests ran without API keys covers ~90% of functionality.
- Backend tests: _API-dependent tests skipped_
- Frontend tests: _full suite with mocked APIs_
View details in the [Actions tab](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`;
await github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
🧰 Tools
🪛 actionlint (1.7.7)

82-82: could not parse as YAML: yaml: line 82: could not find expected ':'

(syntax-check)

🪛 YAMLlint (1.37.1)

[error] 84-84: syntax error: could not find expected ':'

(syntax)

🤖 Prompt for AI Agents
In .github/workflows/smoke-tests.yml between lines 65 and 94, the multiline
JavaScript template literal inside the script block is not properly indented
according to YAML syntax, causing parsing errors. Fix this by indenting every
line of the template literal (the comment string including the lines starting
with "Tests ran without API keys" and the bullet points) to align with the
opening const statement inside the script block, ensuring consistent indentation
under the script: | key. Alternatively, replace the multiline string with a
single-line string using escaped newlines (\n) to avoid YAML indentation issues.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 21, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Tests ran without API keys - covers ~90% of functionality.

  • Backend tests: Skipped API-dependent tests
  • Frontend tests: Full test suite with mocked APIs

View details in the Actions tab.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Tests ran without API keys - covers ~90% of functionality.

  • Backend tests: Skipped API-dependent tests
  • Frontend tests: Full test suite with mocked APIs

View details in the Actions tab.

- Run only 10 essential backend test files (version, schema, serialization, etc.)
- Run only frontend unit tests (skip integration/e2e)
- Reduce timeout from 15 to 8 minutes
- Target critical functionality without external dependencies
- Avoid problematic database/API-dependent tests
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 22, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 22, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests passed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@SonicDMG SonicDMG temporarily deployed to feature/add-smoke-tests - langflow-manual-install PR #9125 July 25, 2025 19:39 — with Render Destroyed
@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests failed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@SonicDMG SonicDMG temporarily deployed to feature/add-smoke-tests - langflow-manual-install PR #9125 July 25, 2025 19:51 — with Render Destroyed
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 25, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Smoke tests passed

Critical functionality validated (~5-8 minutes):

  • Backend: 10 essential test files (imports, schema, serialization, core utils)
  • Frontend: Unit tests only (components, utilities)
  • Coverage: Core functionality without external dependencies

View details in the Actions tab.

@Yukiyukiyeah Yukiyukiyeah added this pull request to the merge queue Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer smoke-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants