Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: all test cases not passing for commit on external repository #3838

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dipishBisht
Copy link

@dipishBisht dipishBisht commented Mar 8, 2025

Enhance GitHub Actions Workflows for PR Testing, Lighthouse CI, and PR Title Linting

Description

This PR improves GitHub Actions workflows by:

Updating PR testing workflow (pr-testing.yml) to support multi-OS environments and ensure tests run correctly for Node.js projects.
Enhancing Lighthouse CI workflow (lighthouse-ci.yml) to automate website performance audits and generate reports.
Improving PR title linting (lint-pr-title.yml) to enforce proper semantic PR titles and enhance consistency.

Changes Include:

  • Added checks to prevent unnecessary workflow runs for bot-generated PRs.
  • Implemented proper git LF settings to avoid line ending conflicts.
  • Improved error handling and logging.
  • Integrated Codecov for better test coverage tracking.
  • Enhanced Lighthouse CI reporting with comments on PRs.
  • Fixed issues with conditional execution in pr-testing.yml.
  • Fix [BUG] Error in github actions testing scripts. #3836

Summary by CodeRabbit

  • Chores

    • Streamlined build and automation workflows for enhanced stability and efficiency. Updates included simplified conditions and dependency improvements to bolster testing and deployment reliability. These enhancements ensure smooth operations and contribute to a more reliable user experience.
  • Style

    • Enhanced interface consistency by adjusting the layout of the community events section and refining the mobile navigation presentation for a cleaner, more intuitive look.
    • Updated styling for the message displayed when no events are available.

Copy link
Contributor

coderabbitai bot commented Mar 8, 2025

Walkthrough

The changes update several GitHub Actions workflows and two React components. In the workflows, the environment variable handling is refactored to use $GITHUB_ENV instead of $GITHUB_OUTPUT, and several conditional checks, version tags, and steps (such as Node version and markdown checks) have been simplified or removed. In the components, minor CSS class reordering and updates modify the visual styling without altering core functionality.

Changes

File(s) Change Summary
.github/workflows/if-nodejs-pr-testing.yml, .github/workflows/lighthouse-ci.yml, .github/workflows/lint-pr-title.yml Transition from using $GITHUB_OUTPUT to $GITHUB_ENV for setting variables; removal and simplification of conditions and steps; updated action versions (e.g., checkout from v3 to v4, Codecov and others updated to newer versions); simplified conditional checks.
components/CommunityEvents.tsx, components/navigation/MobileNavMenu.tsx UI/styling updates: changed CSS class from content-center justify-center to place-content-center for proper centering; reordered class attributes in <Link> components from 'cursor-pointer flex' to 'flex cursor-pointer' for consistency.

Possibly related PRs

  • ci: testing of automerge changes #3662: The changes in the main PR regarding the transition from $GITHUB_OUTPUT to $GITHUB_ENV for setting environment variables are related to the similar update in the retrieved PR, which also modifies output handling to use $GITHUB_ENV.
  • feat: Improved animated border issue for TOC links  #3719: The changes in the main PR regarding the transition from $GITHUB_OUTPUT to $GITHUB_ENV for setting environment variables are related to the updates in the retrieved PR, which also involve modifying the output handling to use $GITHUB_ENV.
  • fix: run tests on branch pushes #3296: The changes in the main PR regarding the transition from $GITHUB_OUTPUT to $GITHUB_ENV for setting environment variables are directly related to the modifications in the retrieved PR, which also updates the handling of the shouldrun variable from output to environment variable.

Suggested labels

ready-to-merge, autoupdate

Suggested reviewers

  • derberg
  • magicmatatjahu
  • devilkiller-ag
  • akshatnema
  • sambhavgupta0705
  • anshgoyalevil
  • Mayaleeeee

Poem

I hopped through YAML fields with glee,
Converting outputs to env, as smooth as can be.
Steps streamlined like a garden path I roam,
Code versions updated for a more refined home.
With each little tweak, my burrow feels light—
A rabbit’s code joy in every merge, day and night! 🐇✨


🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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

Copy link

netlify bot commented Mar 8, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c80bc47
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67cc14d265c95f000865c725
😎 Deploy Preview https://deploy-preview-3838--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (73889d4) to head (c80bc47).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3838   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          667       667           
  Branches       113       113           
=========================================
  Hits           667       667           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dipishBisht dipishBisht changed the title All test cases are passing for commit on external repository fix: all test cases are passing for commit on external repository Mar 8, 2025
Copy link
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: 2

🧹 Nitpick comments (2)
components/CommunityEvents.tsx (1)

30-32: Review the Flexbox Alignment Utility

The class change on the container div from (presumably) 'content-center justify-center' to 'flex place-content-center' alters how the "No Events. Check back later!" message is centered. Note that place-content-center is typically used with CSS Grid layouts. If you intended to center items within a flex container, using justify-center (and possibly items-center) might be more reliable.

Would you like assistance in testing the visual alignment or a diff recommendation to update this styling?

.github/workflows/lint-pr-title.yml (1)

21-22: Subject Pattern Error Message.
The updated error message for the PR title clearly states that it must start with a lowercase letter. Please double-check for any trailing spaces in this block (if present) to comply with YAML style guidelines.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 73889d4 and 74c521d.

📒 Files selected for processing (6)
  • .github/workflows/if-nodejs-pr-testing.yml (1 hunks)
  • .github/workflows/lighthouse-ci.yml (2 hunks)
  • .github/workflows/lint-pr-title.yml (2 hunks)
  • components/AlgoliaSearch.tsx (1 hunks)
  • components/CommunityEvents.tsx (1 hunks)
  • components/navigation/MobileNavMenu.tsx (3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/lighthouse-ci.yml

24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)
.github/workflows/lighthouse-ci.yml

[error] 22-22: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 180000ms (1)
  • GitHub Check: Lighthouse CI
🔇 Additional comments (19)
components/AlgoliaSearch.tsx (1)

2-2: Simplified Type Import Improves Maintainability

The updated import on line 2 now directly pulls the types from @docsearch/react, which simplifies the import path and improves clarity. Please ensure that these types are still correctly exported by the main package and that no downstream type resolution issues occur.

components/navigation/MobileNavMenu.tsx (3)

88-89: Reordering of CSS Classes for Docs Link

The change from 'cursor-pointer flex' to 'flex cursor-pointer' improves consistency and readability. No functional change is introduced, and the new order complies with the desired styling conventions.


97-99: Reordering of CSS Classes for Tools Link

Similar to the Docs link, the Tools link now uses 'flex cursor-pointer' which aligns with the updated class order. This improves consistency and maintains the intended styling.


106-108: Reordering of CSS Classes for Community Link

The Community link is updated with the new class order, ensuring consistency across all navigation items. Verify that this change matches the design system’s guidelines.

.github/workflows/lint-pr-title.yml (3)

13-16: Action Version & Exclusion Condition Update.
The condition excluding certain bot actors is clearly defined, and updating to amannn/[email protected] enhances stability.


24-27: Conditional PR Commenting.
The step conditionally posting a comment when an error exists is well implemented with the updated marocchino/[email protected]. Ensure that the message formatting meets expectations across various PR contexts.


36-38: Deletion of PR Title Lint Comment.
Using the action to delete the lint comment when no error is present (with the same v2.5.0) makes the workflow tidy and avoids outdated notifications.

.github/workflows/if-nodejs-pr-testing.yml (7)

34-35: Transition to Environment Variables.
Switching from $GITHUB_OUTPUT to $GITHUB_ENV for setting the shouldrun variable is a solid update that streamlines the condition checks in subsequent steps.


37-43: LF Line Ending Configuration.
The added step to set Git to use LF line endings conditionally (when env.shouldrun is true) is a good measure to ensure consistent line endings across environments.


44-49: Repository Checkout.
Upgrading the checkout step to use actions/checkout@v4 is a positive change. Verify that the dynamic reference logic for pull requests behaves as expected under all scenarios.


50-54: Node.js Project Verification.
Testing for the existence of package.json and setting an environment variable accordingly is succinct and effective.


56-59: Dependency Installation Step.
Executing npm ci when a Node.js project is detected is appropriate for a clean installation.


60-67: Test and Lint Execution.
The steps for running tests and subsequently linting (conditioned on both packagejson and OS type) are well structured. Confirm that the --if-present flag meets your intended behavior for optional scripts.


68-76: Codecov Coverage Upload.
The step to upload test coverage using Codecov (with action version v4) is properly conditioned and integrates smoothly into the workflow.

.github/workflows/lighthouse-ci.yml (5)

15-18: Simplified Bot Condition in Lighthouse Workflow.
The condition now cleanly excludes PRs from asyncapi-bot and allcontributors[bot], reducing complexity in the decision logic.


26-29: Awaiting Netlify Preview.
Using jakepartusch/[email protected] is a welcome update, ensuring that the workflow waits effectively for Netlify to deploy the preview.


34-44: Lighthouse Audit Step.
Switching to treosh/[email protected] and constructing the URL using the PR number are both effective changes that should improve report accuracy.


45-68: Lighthouse Score Report Script.
The inlined JavaScript aggregates and formats the Lighthouse scan scores clearly into a markdown table. Please verify that the data structure expected from the Lighthouse action matches the parsing logic in the script.

🧰 Tools
🪛 actionlint (1.7.4)

48-48: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


69-77: Lighthouse Statistic Comment Posting.
The final step posts the Lighthouse report as a PR comment using marocchino/[email protected]. This update ensures consistency with other workflows and proper visibility of audit results.

Comment on lines +21 to 22
run: echo "shouldrun=true" >> $GITHUB_ENV

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Setting Environment Variable for 'shouldrun'.
Using $GITHUB_ENV to set shouldrun is consistent with our updated practices. Please check and remove any trailing spaces that might be present after this command to satisfy YAML linting requirements.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 22-22: trailing spaces

(trailing-spaces)

Comment on lines 23 to 25
- if: env.shouldrun == 'true'
uses: actions/checkout@v3

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Checkout Action Version Outdated.
The workflow currently uses actions/checkout@v3, which static analysis flags as outdated. It is recommended to update to actions/checkout@v4 to ensure better compatibility and performance.

-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
📝 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
- if: env.shouldrun == 'true'
uses: actions/checkout@v3
- if: env.shouldrun == 'true'
uses: actions/checkout@v4
🧰 Tools
🪛 actionlint (1.7.4)

24-24: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Copy link
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: 0

🧹 Nitpick comments (2)
.github/workflows/lighthouse-ci.yml (2)

21-22: Remove Trailing Whitespace in Environment Variable Setting

The command that sets the shouldrun variable has trailing spaces, which is flagged by YAML linting. Please remove the trailing whitespace to maintain consistency and pass linting checks.

-        run: echo "shouldrun=true" >> $GITHUB_ENV 
+        run: echo "shouldrun=true" >> $GITHUB_ENV
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 22-22: trailing spaces

(trailing-spaces)


45-68: Lighthouse Score Report Step: Formatting and Error Handling Consideration

The step correctly processes and formats the Lighthouse scores into a comment. As a good-to-have improvement, consider adding error handling in case the expected manifest output is empty or malformed to prevent runtime errors during the execution.

🧰 Tools
🪛 actionlint (1.7.4)

48-48: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 74c521d and c185be3.

📒 Files selected for processing (1)
  • .github/workflows/lighthouse-ci.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/lighthouse-ci.yml

[error] 22-22: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 180000ms (1)
  • GitHub Check: Lighthouse CI
🔇 Additional comments (5)
.github/workflows/lighthouse-ci.yml (5)

15-19: Clarify Conditional Execution in "Should Run" Step

The condition here effectively prevents execution on draft PRs and those triggered by specified bot actors. This clear check improves maintainability.


23-24: Use of Environment Variable in Conditional Checkout Step

The conditional check using env.shouldrun == 'true' is correctly applied, and the update to actions/checkout@v4 is in line with our best practices.


26-33: Await Netlify Preview Step with Action Version Update

The "Await Netlify Preview" step is well-guarded by the same condition, and the update to jakepartusch/[email protected] enhances its reliability when waiting for the Netlify preview.


34-44: Lighthouse Audit Step: Updated Action and URL Construction

The audit step now uses treosh/[email protected] and constructs the URL dynamically using the pull request number. This streamlines the process and is aligned with our PR objectives.


69-77: Verify Secret Usage in "LightHouse Statistic Comment" Step

This step posts the formatted Lighthouse score report using marocchino/[email protected]. Please verify that using the secret GH_TOKEN (instead of the more common GITHUB_TOKEN) is intentional and correctly configured in your workflow context.

@dipishBisht dipishBisht changed the title fix: all test cases are passing for commit on external repository fix: all test cases not passing for commit on external repository Mar 8, 2025
Copy link
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: 0

🧹 Nitpick comments (1)
.github/workflows/lighthouse-ci.yml (1)

21-21: Remove Trailing Spaces in Environment Variable Setting
The command setting shouldrun via $GITHUB_ENV may include trailing spaces (per YAMLlint). Please remove any extra whitespace to comply with linting requirements.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c185be3 and 76aecf9.

📒 Files selected for processing (1)
  • .github/workflows/lighthouse-ci.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/lighthouse-ci.yml

[error] 22-22: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 180000ms (3)
  • GitHub Check: Redirect rules - asyncapi-website
  • GitHub Check: Header rules - asyncapi-website
  • GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (6)
.github/workflows/lighthouse-ci.yml (6)

16-18: Clarify Bot Actor Check Logic
The updated condition correctly skips workflow execution for PRs created by 'asyncapi-bot' or 'allcontributors[bot]'. Ensure that these are the only bot actors relevant to our repository policy.


23-24: Consistent Use of Environment Variable and Updated Checkout Version
Conditionally running the checkout step using env.shouldrun == 'true' is both clear and consistent. Updating from actions/checkout@v3 to actions/checkout@v4 further aligns with our best practices.


26-32: Await Netlify Preview Step Update
The updated step uses env.shouldrun == 'true' for conditional execution and correctly upgrades the action to jakepartusch/[email protected]. This ensures that the Netlify preview is awaited only when necessary.


34-42: Lighthouse Audit Step Enhancements
This step now:
• Applies the condition env.shouldrun == 'true' consistently,
• Upgrades the action to treosh/[email protected], and
• Dynamically constructs the URL using the pull request number.

These changes improve both clarity and reliability of the audit.


45-68: Lighthouse Score Report Step Improvements
The modifications in this step—especially the updated message formatting on lines 58, 63, and 65—produce a clear, dynamic comment detailing audit scores.
Additionally, using core.setOutput to expose the comment ensures downstream steps can access it properly.

🧰 Tools
🪛 actionlint (1.7.4)

48-48: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


69-77: LightHouse Statistic Comment Step Version Update & Token Verification
The update to marocchino/[email protected] is appropriate. However, please verify that using secrets.GH_TOKEN (instead of secrets.GITHUB_TOKEN as used elsewhere) is intentional and correctly configured in our repository secrets.

Copy link
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: 0

🧹 Nitpick comments (2)
.github/workflows/lighthouse-ci.yml (2)

21-22: Clean Up Environment Variable Setting and Trailing Spaces.
The step correctly sets the environment variable shouldrun using $GITHUB_ENV. However, YAMLlint has flagged trailing spaces (reported at line 22). Please remove any trailing whitespace to ensure YAML compliance.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 22-22: trailing spaces

(trailing-spaces)


69-77: Minor Typographical Inconsistency in Step Name.
While the step correctly uses marocchino/[email protected], the step name "LightHouse Statistic Comment" has an inconsistent capitalization. Consider renaming it to "Lighthouse Statistic Comment" for consistency with industry standards and other steps within the workflow.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 76aecf9 and 4253359.

📒 Files selected for processing (1)
  • .github/workflows/lighthouse-ci.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/lighthouse-ci.yml

[error] 22-22: trailing spaces

(trailing-spaces)

🔇 Additional comments (5)
.github/workflows/lighthouse-ci.yml (5)

15-18: Clarify Bot Actor Condition.
The condition now skips execution for pull requests initiated by asyncapi-bot or allcontributors[bot], which aligns with the PR objective of preventing unnecessary runs for bot-generated PRs. Please verify that this check covers all intended bot cases.


23-24: Updated Checkout Action Version.
The checkout step is now correctly gated by env.shouldrun == 'true' and uses actions/checkout@v4, addressing previous version warnings. This change is in line with our updated practices.


26-29: Await Netlify Preview Step Update.
The "Await Netlify Preview" step now uses jakepartusch/[email protected], which is an improvement over the previous version. The conditional execution based on env.shouldrun is clear.


34-43: Lighthouse Audit Step Enhancements.
This step now utilizes treosh/[email protected] and constructs the deployment URL dynamically with the pull request number. Additionally, configuration options like uploadArtifacts and temporaryPublicStorage are explicitly set. These updates enhance clarity and functionality.


45-68: Lighthouse Score Report Step Review.
The GitHub Script step accurately processes the Lighthouse audit results by rounding scores and formatting them into a markdown comment. The dynamic extraction of URLs and scores is implemented correctly and aligns with the updated workflow outputs.

🧰 Tools
🪛 actionlint (1.7.4)

48-48: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Copy link
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 (1)
.github/workflows/lighthouse-ci.yml (1)

21-21: Trailing Whitespace in Environment Variable Setup.
Line 21 appears to include trailing spaces that cause YAML linting issues. Please remove any extra spaces at the end of the line to comply with YAML standards.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4253359 and c80bc47.

📒 Files selected for processing (1)
  • .github/workflows/lighthouse-ci.yml (2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/lighthouse-ci.yml

47-47: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


52-52: unexpected key "retry" for "step" section. expected one of "continue-on-error", "env", "id", "if", "name", "run", "shell", "timeout-minutes", "uses", "with", "working-directory"

(syntax-check)

🪛 YAMLlint (1.35.1)
.github/workflows/lighthouse-ci.yml

[error] 22-22: trailing spaces

(trailing-spaces)

🔇 Additional comments (6)
.github/workflows/lighthouse-ci.yml (6)

16-18: Simplified Bot Actor Check for Conditional Execution.
The condition properly excludes draft PRs and those initiated by the specified bot actors (asyncapi-bot and allcontributors[bot]). Ensure that these values remain accurate as the project evolves.


23-24: Updated Checkout Action Version.
The checkout step now correctly uses actions/checkout@v4, which aligns with our updated version requirements.


26-33: Await Netlify Preview Step Update.
This step uses jakepartusch/[email protected] appropriately with a clear condition check. The configuration meets the intended purpose.


34-44: Lighthouse Audit Step Configuration.
The Lighthouse Audit step now uses treosh/[email protected] and correctly constructs the deployment URL using the pull request number. The explicit setting of uploadArtifacts: false is intentional; please verify that it aligns with the expected reporting and testing requirements.


55-78: Lighthouse Score Report Step Implementation.
The GitHub Script step correctly formats the Lighthouse audit results and sets a comment output for the follow-up step. Ensure that the output from the lighthouse_audit step (accessed via [0].summary) is consistently structured to avoid runtime issues.

🧰 Tools
🪛 actionlint (1.7.4)

58-58: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


79-87: LightHouse Statistic Comment Step.
This final step posts the Lighthouse report as a comment on the pull request using marocchino/[email protected]. The token and parameters are correctly configured.

Comment on lines +45 to +54
- if: env.shouldrun == 'true'
name: Upload Lighthouse Artifacts
uses: actions/upload-artifact@v3
with:
name: lighthouse-results
path: ./lighthouse-results
continue-on-error: true
retry: 3
timeout-minutes: 10

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Upload Lighthouse Artifacts Step: Version Update & Invalid Key.
This step currently uses actions/upload-artifact@v3, which is flagged by static analysis as having an outdated runner; consider updating to the latest available version (e.g., actions/[email protected] if available). Additionally, the key retry on line 52 is not a valid parameter for a GitHub Actions step and should be removed.

Proposed diff:

-        retry: 3
📝 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
- if: env.shouldrun == 'true'
name: Upload Lighthouse Artifacts
uses: actions/upload-artifact@v3
with:
name: lighthouse-results
path: ./lighthouse-results
continue-on-error: true
retry: 3
timeout-minutes: 10
- if: env.shouldrun == 'true'
name: Upload Lighthouse Artifacts
uses: actions/upload-artifact@v3
with:
name: lighthouse-results
path: ./lighthouse-results
continue-on-error: true
timeout-minutes: 10
🧰 Tools
🪛 actionlint (1.7.4)

47-47: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


52-52: unexpected key "retry" for "step" section. expected one of "continue-on-error", "env", "id", "if", "name", "run", "shell", "timeout-minutes", "uses", "with", "working-directory"

(syntax-check)

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.

[BUG] Error in github actions testing scripts.
1 participant