Skip to content

Use .net 8 SDK to run dotnet examples #1933

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

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Sep 9, 2024

User description

Description

Selenium supports many many versions. And .net 8 is the first where selenium doesn't require any dependencies.

Motivation and Context

To use the latest stable SDK to run examples.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

enhancement, configuration changes


Description

  • Updated the .NET SDK version from 6.x to 8.x in the GitHub Actions workflow for both stable and nightly releases.
  • Changed the target framework in the SeleniumDocs.csproj file from net6.0 to net8.0 to utilize the latest .NET features.

Changes walkthrough 📝

Relevant files
Configuration changes
dotnet-examples.yml
Update .NET SDK version in GitHub Actions workflow             

.github/workflows/dotnet-examples.yml

  • Updated .NET version from 6.x to 8.x for stable and nightly setups.
  • Adjusted configuration to use the latest .NET SDK.
  • +2/-2     
    Enhancement
    SeleniumDocs.csproj
    Upgrade target framework to .NET 8 in project file             

    examples/dotnet/SeleniumDocs/SeleniumDocs.csproj

    • Changed target framework from net6.0 to net8.0.
    +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    netlify bot commented Sep 9, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 94754fd

    Copy link
    Contributor

    qodo-merge-pro bot commented Sep 9, 2024

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Compatibility
    Ensure all dependencies and libraries used in the project are compatible with .NET 8

    Project Updates
    Verify if any project-specific configurations or packages need to be updated for .NET 8

    Copy link
    Contributor

    qodo-merge-pro bot commented Sep 9, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Add a step to verify the installed .NET version

    Consider adding a step to verify the installed .NET version after setup, to ensure
    the correct version is being used in the workflow.

    .github/workflows/dotnet-examples.yml [47-51]

     - name: Set up .Net Stable
       if: matrix.release == 'stable'
       uses: actions/setup-dotnet@v4
       with:
         dotnet-version: 8.x
    +- name: Verify .NET version
    +  run: dotnet --version
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Adding a verification step for the .NET version ensures that the correct version is installed and being used, which can prevent potential issues in the workflow. This is a useful enhancement for debugging and validation.

    8
    Best practice
    Specify a more precise version number for the .NET SDK

    Consider using a more specific version of .NET 8.x, such as '8.0', to ensure
    consistency across different environments and avoid potential issues with future
    minor releases.

    .github/workflows/dotnet-examples.yml [47-51]

     - name: Set up .Net Stable
       if: matrix.release == 'stable'
       uses: actions/setup-dotnet@v4
       with:
    -    dotnet-version: 8.x
    +    dotnet-version: '8.0'
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Using a specific version like '8.0' instead of '8.x' can help ensure consistency across different environments and avoid potential issues with future minor releases. This is a good practice for maintaining stability.

    7

    @nvborisenko
    Copy link
    Member Author

    CI build is green, @harsha509 please review.

    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

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

    Thank you @nvborisenko !

    @harsha509 harsha509 merged commit 4ddb8c1 into SeleniumHQ:trunk Sep 10, 2024
    9 checks passed
    @nvborisenko nvborisenko deleted the dotnet-sdk8 branch September 10, 2024 11:05
    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.

    2 participants