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

Update main.yml for Ubuntu and macOS versions, and add tag.yml for versioning #289

Closed
wants to merge 1 commit into from

Conversation

kshyk
Copy link
Owner

@kshyk kshyk commented Mar 4, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded continuous integration workflows to use the latest operating system and Node.js versions.
    • Optimized dependency handling for browser installation in Linux environments.
  • New Features

    • Introduced an automated version bump and tagging process to streamline release management.

Copy link

coderabbitai bot commented Mar 4, 2025

Walkthrough

This pull request updates the CI/CD workflow configuration and introduces a new workflow. The main workflow file is modified to upgrade operating system versions, Node.js version, and update the Firefox installation archive format. Additionally, a new workflow is added to automate version bumping, tagging, and release creation on pushes to the main branch.

Changes

File(s) Change Summary
.github/workflows/main.yml Updated OS versions for Linux (from ubuntu-22.04 to ubuntu-24.04) and macOS (from macos-13 to macos-15); upgraded Node.js version from 20 to 22; changed Firefox archive from .tar.bz2 to .tar.xz.
.github/workflows/tag.yml New workflow added to automate version bumping and tagging; includes steps for checking out code, bumping version & pushing tag, and creating a GitHub release using Ubuntu 24.04.

Sequence Diagram(s)

sequenceDiagram
    participant Repo as Repository
    participant TagWF as Tag Workflow
    participant Checkout as Checkout Action
    participant Bump as Version Bump Action
    participant Release as Release Action

    Repo->>TagWF: Push to main branch
    TagWF->>Checkout: Checkout full repository code
    Checkout-->>TagWF: Code checked out
    TagWF->>Bump: Bump version and push tag
    Bump-->>TagWF: Tag created
    TagWF->>Release: Create a GitHub release using new tag
    Release-->>TagWF: Release published
Loading

Poem

I hop through change with joyful pace,
Upgrading systems in our CI space.
Ubuntu and macOS take a leap,
Node and Firefox now run deep.
Tagging a new release with a happy trace –
A rabbit's song in code's embrace!
🐇✨


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

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

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

sonarqubecloud bot commented Mar 4, 2025

Copy link

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb22286 and 74320fb.

📒 Files selected for processing (2)
  • .github/workflows/main.yml (6 hunks)
  • .github/workflows/tag.yml (1 hunks)
🔇 Additional comments (9)
.github/workflows/main.yml (5)

20-20: Update Linux OS version is correctly applied.
The matrix now specifies ubuntu-24.04 which aligns with the intended environment upgrade.


32-34: Node.js version upgrade validated.
The update to node-version: 22 correctly reflects the new requirement. Ensure that all dependent Node modules are compatible with this version.


68-69: macOS environment update confirmed.
The macOS job now uses macos-15, which meets the updated requirements.


82-83: macOS Node.js version upgrade is correct.
The change to node-version: 22 is consistently applied here as well.


117-120: Windows Node.js version is updated accordingly.
The Windows job now uses Node.js version 22, ensuring consistency across CI environments.

.github/workflows/tag.yml (4)

1-9: New tagging workflow added.
The new workflow (Bump & Tag) is structured to trigger on pushes to the main branch and runs on ubuntu-24.04. The job steps, including code checkout and version bumping (using mathieudutour/github-tag-action@v6.2), are clearly organized and align with best practices for automating version management.


10-16: Checkout step configuration is solid.
The checkout step uses a fetch-depth of 0, ensuring that the full history is available for accurate version bumping and tagging.


17-22: Version bumping step validated.
Using mathieudutour/github-tag-action@v6.2 with the GitHub token from secrets is an effective approach. No immediate issues found.


23-28: Release creation step is correctly configured.
The release action correctly references the output from the tagging step for tag, name, and changelog. This automation will streamline your release process.

Comment on lines 49 to 53
if: matrix.browser == 'firefox'
run: |
wget -qO ~/Firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
sudo tar xjf ~/Firefox.tar.bz2 -C /opt/
wget -qO ~/Firefox.tar.xz "https://download.mozilla.org/?product=firefox-latest&os=linux64"
sudo tar xjf ~/Firefox.tar.xz -C /opt/
sudo ln -svf /opt/firefox/firefox /usr/bin/
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Firefox extraction flag may require update.
The workflow now downloads the Firefox archive in .tar.xz format (line 51), but the extraction command on line 52 uses the xjf flag which is intended for bzip2 archives. For .tar.xz archives, please update the command to use the xJf flag. For example:

-          sudo tar xjf ~/Firefox.tar.xz -C /opt/
+          sudo tar xJf ~/Firefox.tar.xz -C /opt/

This change ensures correct extraction of the xz-compressed archive.

📝 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: matrix.browser == 'firefox'
run: |
wget -qO ~/Firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
sudo tar xjf ~/Firefox.tar.bz2 -C /opt/
wget -qO ~/Firefox.tar.xz "https://download.mozilla.org/?product=firefox-latest&os=linux64"
sudo tar xjf ~/Firefox.tar.xz -C /opt/
sudo ln -svf /opt/firefox/firefox /usr/bin/
if: matrix.browser == 'firefox'
run: |
wget -qO ~/Firefox.tar.xz "https://download.mozilla.org/?product=firefox-latest&os=linux64"
sudo tar xJf ~/Firefox.tar.xz -C /opt/
sudo ln -svf /opt/firefox/firefox /usr/bin/

@kshyk kshyk closed this Mar 4, 2025
@kshyk kshyk deleted the fix-ubuntu-firefox-installation branch March 4, 2025 01: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.

1 participant