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

Work CI-CD #23

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Work CI-CD #23

merged 5 commits into from
Dec 18, 2024

Conversation

Ellerbach
Copy link
Member

@Ellerbach Ellerbach commented Dec 11, 2024

Description

  • Update github workflow action for git checkout
  • Update github workflow action version for .NET setup

Motivation and Context

Updates the actions to the latest versions for maintainability and security.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

Summary by CodeRabbit

  • Chores
    • Updated the workflow configuration for building and publishing the project.
    • Upgraded the action versions for checking out the repository and setting up the .NET environment from v2 to v4 in the build workflows.

Copy link

coderabbitai bot commented Dec 11, 2024

Walkthrough

The pull request updates the GitHub Actions workflows for the TestStream.Runner project. The build-and-publish.yml workflow now only triggers on workflow_dispatch, removing the pull request trigger for the main branch. Additionally, both the build-and-publish.yml and build.yml workflows have upgraded the checkout and setup-dotnet actions from version v2 to v4, while the overall logic and sequence of the steps remain unchanged.

Changes

File Path Change Summary
.github/workflows/build-and-publish.yml Updated trigger to workflow_dispatch only, upgraded checkout action from v2 to v4, upgraded setup-dotnet action from v2 to v4.
.github/workflows/build.yml Upgraded checkout action from v2 to v4, upgraded setup-dotnet action from v2 to v4, other steps remain unchanged.

Possibly related PRs

Suggested labels

Type: enhancement


📜 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 6dc6409 and 0e38ddd.

📒 Files selected for processing (1)
  • .github/workflows/build.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build.yml

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 generate docstrings to generate docstrings for this PR. (Experiment)
  • @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

@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 (3)
.github/workflows/build.yml (1)

Line range hint 12-12: Consider upgrading checkout action to v4

While updating action versions, it would be good to also upgrade actions/checkout@v2 to actions/checkout@v4 for consistency and to leverage the latest features and security updates.

-      uses: actions/checkout@v2
+      uses: actions/checkout@v4
🧰 Tools
🪛 actionlint (1.7.4)

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

(action)

.github/workflows/build-and-publish.yml (2)

Line range hint 4-7: Remove commented trigger configuration

The commented code is marked "to be removed after testing". Since testing is complete, these comments should be removed for cleaner configuration.

-  # to be removed after testing
-  # pull_request:
-  #   branches:
-  #     - main

Line range hint 14-15: Consider upgrading other actions to their latest versions

Several actions in the workflow are using older versions. Consider upgrading them for better security and features:

  • actions/checkout@v2v4
  • GitTools/actions/gitversion/setup@v0v1
  • GitTools/actions/gitversion/execute@v0v1
  • ncipollo/release-action@v1v1.13.0
-      uses: actions/checkout@v2
+      uses: actions/checkout@v4

-      uses: GitTools/actions/gitversion/setup@v0
+      uses: GitTools/actions/gitversion/setup@v1

-      uses: gittools/actions/gitversion/execute@v0
+      uses: gittools/actions/gitversion/execute@v1

-      uses: ncipollo/release-action@v1
+      uses: ncipollo/release-action@v1.13.0

Also applies to: 28-29, 71-76

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 283ae0a and 69eb307.

📒 Files selected for processing (2)
  • .github/workflows/build-and-publish.yml (1 hunks)
  • .github/workflows/build.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/build.yml (1)

17-17: LGTM! Good upgrade to setup-dotnet@v4

The upgrade to the latest stable version of setup-dotnet action is a good practice for security and features.

.github/workflows/build-and-publish.yml (1)

21-21: LGTM! Good upgrade to setup-dotnet@v4

The upgrade to the latest stable version of setup-dotnet action is a good practice for security and features.

Update checkout action
Update checkout action
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)
.github/workflows/build.yml (1)

23-23: Remove trailing spaces.

There are trailing spaces on this line that should be removed for cleaner formatting.

-        
+
🧰 Tools
🪛 yamllint (1.35.1)

[error] 23-23: trailing spaces

(trailing-spaces)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5db63b4 and 6dc6409.

📒 Files selected for processing (1)
  • .github/workflows/build.yml (1 hunks)
🧰 Additional context used
🪛 yamllint (1.35.1)
.github/workflows/build.yml

[error] 23-23: trailing spaces

(trailing-spaces)

🔇 Additional comments (1)
.github/workflows/build.yml (1)

14-14: LGTM! Action version upgrades are appropriate.

The upgrades to v4 for both actions/checkout and actions/setup-dotnet are good improvements that bring security enhancements and better performance.

Let's verify these are the latest stable versions:

Also applies to: 17-17

✅ Verification successful

✓ Action versions are up-to-date with the latest stable releases

The upgrade to v4 for both actions is verified to be using the latest major versions:

  • actions/checkout@v4 (latest: v4.2.2)
  • actions/setup-dotnet@v4 (latest: v4.1.0)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the latest releases for the GitHub Actions being used
# Expected: v4.x.x should be the latest major version

# Check latest releases for actions/checkout
gh api repos/actions/checkout/releases/latest --jq .tag_name

# Check latest releases for actions/setup-dotnet
gh api repos/actions/setup-dotnet/releases/latest --jq .tag_name

Length of output: 143

@networkfusion
Copy link
Member

I have also updated the checkout actions for node 20 (v4)
LGTM!

remove whitespace
@Ellerbach
Copy link
Member Author

@networkfusion thanks a lot :-)
Note that the build pipeline is failing as a recent change in nanoff seems to have set a non 0 exit code even in case of success. See: https://dev.azure.com/nanoframework/nanoFramework.IoT.TestStream/_build/results?buildId=50972&view=logs&j=e5976d1c-4fc2-5dc9-502f-34e1daa5b4f2&t=9213e9a3-d5ae-5e36-0383-ae6380b09ba3

So, the task fail while they are not supposed to :-)

@networkfusion networkfusion changed the title Adjust action version for .NET Work CI-CD Dec 18, 2024
@networkfusion networkfusion merged commit 9d98d3a into main Dec 18, 2024
4 checks passed
@networkfusion networkfusion deleted the adjust-actions branch December 18, 2024 14:40
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants