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

Upgrade GitHub Actions versions #1623

Merged
merged 6 commits into from
Jul 2, 2024

Conversation

adriangohjw
Copy link
Contributor

@adriangohjw adriangohjw commented May 21, 2024

Summary

Node.js 16 actions are deprecated and we want to update them to use the latest actions

Reference:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v3, actions/cache@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Changes

  • Updated actions/setup-node@v3 to actions/setup-node@v4
  • Updated actions/cache@v3 to actions/cache@v4
    • and also actions/cache/save@v3 to actions/cache/save@v4
  • Updated actions/upload-artifact@v3 to actions/upload-artifact@v4
    • Uploads are significantly faster, upwards of 90% improvement in worst case scenarios according to the documentation
    • added unique artifact name due to breaking change from v3 and v4 by following migration guide

Pull Request checklist

Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by ~.

  • [ ] Add/update test to cover these changes
  • [ ] Update documentation
  • Update CHANGELOG file
    Add the CHANGELOG entry at the top of the file.

Other Information

Remove this paragraph and mention any other important and relevant information such as benchmarks.


This change is Reviewable

Summary by CodeRabbit

  • Chores
    • Upgraded GitHub Actions to use newer versions (setup-node@v4, cache@v4, upload-artifact@v4) for improved performance and security.
    • Updated artifact naming conventions in workflows for better organization and tracking.

Copy link

coderabbitai bot commented May 21, 2024

Walkthrough

The recent changes across multiple GitHub workflow files involve updating the versions of the setup-node, cache, and upload-artifact actions from v3 to v4. Additionally, in some workflows, filenames for uploaded test results and logs have been made dynamic to include GitHub context like run_id, job, and matrix.versions.

Changes

File Path Change Summary
.github/workflows/examples.yml Upgraded setup-node, cache, and upload-artifact actions from v3 to v4. Updated artifact naming convention.
.github/workflows/lint-js-and-ruby.yml Upgraded setup-node and cache actions from v3 to v4.
.github/workflows/main.yml Updated setup-node, cache, and upload-artifact actions from v3 to v4.
.github/workflows/package-js-tests.yml Upgraded setup-node and cache actions from v3 to v4.
.github/workflows/rspec-package-specs.yml Updated cache action from v3 to v4 and modified artifact naming convention.
CHANGELOG.md Documented the upgrade of GitHub Actions to use Node.js 20.0 versions.

Poem

🐰✨

A rabbit hopped through code and file,
Updating actions with a smile.
From v3 to v4, the scripts do soar,
With dynamic names and much, much more.
GitHub workflows, sleek and bright,
All thanks to changes made just right!

🌟🖥️


Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are currently opted into early access features by default.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

@adriangohjw adriangohjw marked this pull request as ready for review May 21, 2024 18:42
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: 0

Outside diff range and nitpick comments (1)
CHANGELOG.md (1)

21-23: Ensure consistent heading levels for better document structure.

- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).

Consider changing the heading levels in this section to maintain a logical and hierarchical structure throughout the document.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 36f342c and 1e07da7.
Files selected for processing (6)
  • .github/workflows/examples.yml (3 hunks)
  • .github/workflows/lint-js-and-ruby.yml (2 hunks)
  • .github/workflows/main.yml (7 hunks)
  • .github/workflows/package-js-tests.yml (2 hunks)
  • .github/workflows/rspec-package-specs.yml (2 hunks)
  • CHANGELOG.md (1 hunks)
Files skipped from review due to trivial changes (5)
  • .github/workflows/examples.yml
  • .github/workflows/lint-js-and-ruby.yml
  • .github/workflows/main.yml
  • .github/workflows/package-js-tests.yml
  • .github/workflows/rspec-package-specs.yml

@adriangohjw adriangohjw marked this pull request as draft May 22, 2024 02:23
@justin808
Copy link
Member

@adriangohjw can you investigate the CI failures?

@adriangohjw
Copy link
Contributor Author

@justin808 alright will do, will look at it sometime this week 🫡

@justin808
Copy link
Member

@adriangohjw any update?

@justin808 justin808 changed the title Upgrade GitHub Actions versions [WIP] Upgrade GitHub Actions versions Jun 25, 2024
@adriangohjw adriangohjw marked this pull request as ready for review July 2, 2024 06:48
@adriangohjw
Copy link
Contributor Author

@justin808 sorry for the delay, fixed!

@adriangohjw adriangohjw changed the title [WIP] Upgrade GitHub Actions versions Upgrade GitHub Actions versions Jul 2, 2024
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

Commits

Files that changed from the base of the PR and between 1e07da7 and 2a34821.

Files selected for processing (6)
  • .github/workflows/examples.yml (3 hunks)
  • .github/workflows/lint-js-and-ruby.yml (2 hunks)
  • .github/workflows/main.yml (8 hunks)
  • .github/workflows/package-js-tests.yml (2 hunks)
  • .github/workflows/rspec-package-specs.yml (2 hunks)
  • CHANGELOG.md (1 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/lint-js-and-ruby.yml
  • .github/workflows/package-js-tests.yml
Additional context used
Markdownlint
CHANGELOG.md

18-18: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


18-18: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


21-21: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


26-26: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


22-22: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

Additional comments not posted (29)
.github/workflows/rspec-package-specs.yml (5)

38-40: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


53-55: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


55-56: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.


58-60: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


60-61: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.

.github/workflows/examples.yml (5)

38-40: Upgrade GitHub Actions version: setup-node@v4

The actions/setup-node version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


54-56: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


59-61: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


91-93: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


93-94: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.

.github/workflows/main.yml (19)

29-31: Upgrade GitHub Actions version: setup-node@v4

The actions/setup-node version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


45-47: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


56-58: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


65-67: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


78-80: Upgrade GitHub Actions version: cache/save@v4

The actions/cache/save version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


100-102: Upgrade GitHub Actions version: setup-node@v4

The actions/setup-node version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


116-118: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


121-123: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


126-128: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


131-133: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


138-140: Upgrade GitHub Actions version: cache@v4

The actions/cache version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


182-184: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


184-185: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.


187-189: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


189-190: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.


192-194: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


194-195: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.


197-199: Upgrade GitHub Actions version: upload-artifact@v4

The actions/upload-artifact version has been upgraded from v3 to v4. Ensure that the new version is compatible with the existing workflow and that it aligns with the migration guide.


199-200: Update artifact naming convention

The artifact name has been updated to include dynamic values such as github.run_id, github.job, and matrix.versions. This change ensures unique artifact names for each run, improving traceability and avoiding conflicts.

Comment on lines +21 to +22
#### Changed
- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).
Copy link

Choose a reason for hiding this comment

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

Ensure proper formatting of headings and lists.

Headings and lists should be surrounded by blank lines to improve readability and comply with Markdown standards.

### [Unreleased]

#### Changed

- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).

### [14.0.3] - 2024-06-28
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
#### Changed
- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).
### [Unreleased]
#### Changed
- Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).
### [14.0.3] - 2024-06-28
Tools
Markdownlint

21-21: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


22-22: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

@justin808 justin808 merged commit 6a9c101 into shakacode:master Jul 2, 2024
11 checks passed
@justin808
Copy link
Member

Thanks @adriangohjw

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