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

chore: update github actions version #936

Merged

Conversation

DongjaJ
Copy link
Contributor

@DongjaJ DongjaJ commented Dec 19, 2024

What this PR does / why we need it?

  • update .github/workflows/*.yml's actions/checkout version 2 to 4
  • update .github/workflows/*.yml's pnpm/action-setup version 2 to 4
  • update .github/workflows/*.yml's actions/cache version 3 to 4
  • update .github/workflows/*.yml's codecov/codecov-action version 1 to 5
    • migrate file fileld to files fielid
  • update .github/workflows/*.yml's actions/cache version 3 to 4
  • update .github/workflows/*.yml's actions/setup-node version 2 to 4
  • update .github/workflows/*.yml's peaceiris/actions-gh-pages version 3 to 4

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

Summary by CodeRabbit

  • New Features

    • Updated GitHub Actions workflows to utilize the latest versions of various actions, enhancing performance and reliability.
  • Bug Fixes

    • Improved caching mechanisms in multiple workflows to ensure more efficient dependency management.
  • Documentation

    • Adjusted parameters in workflows for better clarity and functionality regarding coverage file uploads.

@CLAassistant
Copy link

CLAassistant commented Dec 19, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

coderabbitai bot commented Dec 19, 2024

Walkthrough

This pull request focuses on updating GitHub Actions workflow configurations across multiple files in the .github/workflows/ directory. The primary changes involve upgrading various GitHub Actions to their latest versions, including actions/checkout, pnpm/action-setup, actions/setup-node, actions/cache, and codecov/codecov-action. The updates span five workflow files: ci.yml, create-yorkie-app-publish.yml, devtools-publish.yml, github-page-publish.yml, and npm-publish.yml. These version upgrades aim to leverage the latest features and improvements in the GitHub Actions ecosystem.

Changes

File Changes
.github/workflows/ci.yml - Upgraded actions/checkout from v2 to v4
- Updated pnpm/action-setup from v2 to v4
- Updated actions/cache from v3 to v4
- Upgraded codecov/codecov-action from v1 to v5
- Changed parameter file to files
.github/workflows/create-yorkie-app-publish.yml - Upgraded actions/checkout from v2 to v4
- Updated pnpm/action-setup from v2 to v4
- Updated actions/setup-node from v2 to v4
.github/workflows/devtools-publish.yml - Upgraded actions/checkout from v2.3.1 to v4
- Updated pnpm/action-setup from v2 to v4
- Updated actions/setup-node from v2 to v4
.github/workflows/github-page-publish.yml - Upgraded actions/checkout from v2.3.1 to v4
- Updated pnpm/action-setup from v2 to v4
- Updated actions/setup-node from v2 to v4
- Updated actions/cache from v3 to v4
- Upgraded peaceiris/actions-gh-pages from v3 to v4
.github/workflows/npm-publish.yml - Upgraded actions/checkout from v2 to v4
- Updated pnpm/action-setup from v2 to v4
- Updated actions/setup-node from v2 to v4
- Updated actions/cache from v3 to v4

Possibly related PRs

Poem

🐰 Workflows dancing, versions so bright,
Actions upgraded with pure delight!
From v2 to v4, we leap and we bound,
GitHub's magic, in code we have found!
Rabbit's CI chorus sings with glee! 🚀


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between eb3cdb5 and 553010b.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml (3 hunks)
  • .github/workflows/create-yorkie-app-publish.yml (1 hunks)
  • .github/workflows/devtools-publish.yml (1 hunks)
  • .github/workflows/github-page-publish.yml (2 hunks)
  • .github/workflows/npm-publish.yml (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .github/workflows/npm-publish.yml
  • .github/workflows/github-page-publish.yml
🔇 Additional comments (4)
.github/workflows/devtools-publish.yml (1)

14-14: Verify compatibility with updated GitHub Actions versions

The version upgrades look good, but there are some important considerations:

  • actions/checkout@v4 requires Node 16+ (satisfied by Node 18 in this workflow)
  • actions/setup-node@v4 properly configured with pnpm caching

Let's verify the compatibility of these versions with the current workflow:

Also applies to: 16-16, 21-21

✅ Verification successful

GitHub Actions version upgrades are compatible

The workflow configuration is properly set up and compatible with the upgraded actions:

  • Node.js 18 is used, which satisfies the Node 16+ requirement for actions/checkout@v4
  • pnpm version 9 is correctly specified for pnpm/action-setup@v4
  • actions/setup-node@v4 is properly configured with pnpm caching
  • No breaking changes or open issues found for the upgraded actions
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any known issues or breaking changes in the upgraded actions

# Check the repository's Node.js version requirements
rg "engines|node-version" package.json

# Check for any GitHub issues mentioning breaking changes
gh api graphql -f query='
{
  repository(owner: "actions", name: "checkout") {
    issues(first: 5, labels: ["breaking-change"], states: OPEN) {
      nodes {
        title
        url
      }
    }
  }
}'

Length of output: 296


Script:

#!/bin/bash
# Let's check the workflow file for Node.js version and other configurations
cat .github/workflows/devtools-publish.yml

# Also check for any pnpm-related configurations
fd package.json --exec cat {}

Length of output: 10477

.github/workflows/create-yorkie-app-publish.yml (1)

19-19: LGTM! Version updates are consistent

The action version updates are consistent with other workflows and maintain the required npm publishing configuration.

Also applies to: 21-21, 26-26

.github/workflows/ci.yml (2)

Line range hint 33-38: Cache configuration looks good

The upgrade to actions/cache@v4 maintains the correct cache configuration for pnpm:

  • Appropriate cache key using pnpm-lock.yaml
  • Correct restore-keys fallback

51-51: Verify codecov configuration changes

The upgrade from codecov-action@v1 to v5 includes a breaking change:

  • The parameter has been renamed from file to files (correctly updated)

Let's verify the codecov configuration:

Also applies to: 53-53

✅ Verification successful

Codecov configuration is correctly set up

The verification confirms that:

  • Coverage file path ./coverage/lcov.info is correctly configured in the CI workflow
  • Coverage generation is properly set up in the SDK package using Vitest with the test:ci script
  • Codecov configuration is present and properly configured in codecov.yml
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify codecov configuration and coverage file path

# Check if coverage file path exists in other workflow files
rg "lcov.info" .github/workflows/

# Verify coverage file generation in package.json scripts
rg "coverage" package.json

Length of output: 123


Script:

#!/bin/bash
# Let's check the test scripts and coverage configuration in package.json
cat package.json

# Also check for any Jest or other test framework configuration files
fd -e json -e js -e yaml -e yml -E "node_modules" . -x grep -l "coverage"

Length of output: 1419


Script:

#!/bin/bash
# Let's check the SDK package configuration and codecov config
cat packages/sdk/package.json
cat codecov.yml

Length of output: 2505


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

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.60%. Comparing base (267878f) to head (553010b).
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #936      +/-   ##
==========================================
- Coverage   81.16%   78.60%   -2.56%     
==========================================
  Files          60       62       +2     
  Lines        4624     5417     +793     
  Branches      942      998      +56     
==========================================
+ Hits         3753     4258     +505     
- Misses        604      870     +266     
- Partials      267      289      +22     

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

@hackerwins hackerwins self-requested a review December 23, 2024 04:46
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@hackerwins hackerwins merged commit a217445 into yorkie-team:main Dec 23, 2024
2 checks passed
@DongjaJ DongjaJ deleted the chore/update-github-actions-version branch December 23, 2024 07:07
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