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

ci(workflow): add lint-web job #347

Merged
merged 2 commits into from
Nov 10, 2023
Merged

ci(workflow): add lint-web job #347

merged 2 commits into from
Nov 10, 2023

Conversation

ccamel
Copy link
Member

@ccamel ccamel commented Nov 7, 2023

Self explanatory (similar to okp4/dataverse-portal).

Summary by CodeRabbit

  • New Features
    • Introduced a new job "lint-web" for performance testing.
  • Chores
    • Implemented caching for yarn in various workflows to improve build process efficiency.
  • Refactor
    • Modified the "report-new-dependencies" job to include a cache setting for Node version.

Copy link
Contributor

coderabbitai bot commented Nov 7, 2023

Walkthrough

The changes introduced across the workflows primarily focus on enhancing the caching mechanism by incorporating yarn cache configurations. A new job, "lint-web", has been added to the lint workflow, which includes setting up a Node environment, running Lighthouse for performance testing, and uploading the reports.

Changes

File Path Change Summary
.github/workflows/lint.yml Introduced a new job "lint-web" for performance testing and report generation. Added cache setting for Node version in "report-new-dependencies" job.
.github/workflows/publish.yml, .github/workflows/update-versioned-docs.yml Added a cache configuration for yarn in the setup-node action.

Poem

🍂 As the leaves fall this November day, 🍁

In the world of code, rabbits hop and play. 🐇💻

With yarn in paw, they weave a cache, 🧶

Making workflows run in a flash. ⚡

On this day in history, magic was in the air, ✨

As the first long distance TV broadcast did appear. 📺

So let's celebrate these changes, oh so fine, 🎉

In the spirit of progress, just like '29. 🕰️


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Member

@bot-anik bot-anik left a comment

Choose a reason for hiding this comment

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

Device URL
desktop http://localhost:3000/

Device URL
mobile http://localhost:3000/

Not what you expected? Are your scores flaky? GitHub runners could be the cause.
Try running on Foo instead

@ccamel ccamel requested a review from amimart November 7, 2023 10:19
@ccamel ccamel self-assigned this Nov 7, 2023
@ccamel ccamel marked this pull request as ready for review November 7, 2023 10:19
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 47e5b30 and a172058.
Files selected for processing (3)
  • .github/workflows/lint.yml (2 hunks)
  • .github/workflows/publish.yml (1 hunks)
  • .github/workflows/update-versioned-docs.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/publish.yml
Additional comments: 4
.github/workflows/update-versioned-docs.yml (1)
  • 63-66: The addition of caching for yarn dependencies in the setup-node action is a good practice for improving the efficiency of the workflow. However, ensure that the cache key is properly invalidated when dependencies change. This is usually handled by the setup-node action itself, but it's worth verifying.
.github/workflows/lint.yml (3)
  • 94-147: The new "lint-web" job looks well-structured and follows the standard pattern for setting up a Node environment, fetching dependencies, starting a web server, running Lighthouse for performance testing, uploading the reports, and stopping the web server. Ensure that the WEB_PORT environment variable does not conflict with any other services running on the same port.

  • 148-150: The "report-new-dependencies" job now includes a cache setting for yarn. This should improve the efficiency of dependency management. However, ensure that the cache is invalidated and updated correctly when dependencies change.

  • 202-208: The cache configuration for yarn has been added to the "lint-scss" job in the setup-node action. This should improve the efficiency of dependency management. However, ensure that the cache is invalidated and updated correctly when dependencies change.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 47e5b30 and 53b1d6c.
Files selected for processing (3)
  • .github/workflows/lint.yml (2 hunks)
  • .github/workflows/publish.yml (1 hunks)
  • .github/workflows/update-versioned-docs.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/publish.yml
Additional comments: 4
.github/workflows/update-versioned-docs.yml (1)
  • 63-66: The addition of caching for yarn in the setup-node action is a good practice for improving build times. However, ensure that the cache key is properly invalidated when dependencies change. This is typically done by including a hash of yarn.lock in the cache key.
.github/workflows/lint.yml (3)
  • 97-146: The new "lint-web" job looks well-structured and follows the best practices for GitHub Actions. It sets up a Node environment, fetches dependencies, starts a web server, runs Lighthouse for performance testing, uploads the reports, and then stops the web server. Ensure that the OKP4_TOKEN secret is set in the repository settings.

  • 148-149: The "report-new-dependencies" job now includes a cache setting for yarn. This should improve the performance of the job by caching dependencies between runs. However, ensure that the caching behavior does not introduce any unexpected side effects, especially when dependencies are updated.

  • 201-204: The setup-node action in the "lint-scss" job now includes a cache setting for yarn. This should improve the performance of the job by caching dependencies between runs. However, ensure that the caching behavior does not introduce any unexpected side effects, especially when dependencies are updated.

@ccamel ccamel merged commit 3d8026a into main Nov 10, 2023
12 checks passed
@ccamel ccamel deleted the ci/lighthouse branch November 10, 2023 07:31
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.

3 participants