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

Add GitHub Actions & Upgrade to .NET 8 #380

Merged
merged 10 commits into from
Jan 16, 2024

Conversation

JosefDvorak
Copy link
Collaborator

Motivation

The purpose of this PR is to add a minimum viable replacement for AppVeyor Build test using GitHub Actions Workflow

As part of the implementation, several issues were encountered that had to be addressed.

  • The .NET Core 2.2 compatibility with Actions Workflow
    • Resolved by upgrade to .NET 8
  • Packages with bugs when used in .NET 8
    • Resolved by upgrading:
      • Autofac
      • SqlClient
  • JSON serialization behaviour has changed.
    • Resolved by implementing missing converters.

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

Verify that project builds, reports execute and conduct code review.

For your reference, the GitHub Action Workflow has been tested on a mirror pull request on forked repository:

JosefDvorak#3

JosefDvorak and others added 8 commits January 9, 2024 01:01
Adds configuration file for GitHub Actions for .NET 8.0 on windows-latest.
The serialization logic has changed in .NET 8 and the code needs to implement converters for complex type, such as System.Version.
Add specific Node version to use: 20.7.x

Add front-end build step.

Add manual Workflow dispatch.
@JosefDvorak JosefDvorak added bug Something isn't working enhancement New feature or request .NET Pull requests that update .net code labels Jan 15, 2024
@kentico-ericd
Copy link
Member

@JosefDvorak Not sure if you got this too, but I got this error when trying to run an action:

System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.

So I made a few changes in 268dfaf to resolve that, then a few other changes suggested by code analysis.

Otherwise, it's all working and looks good 👍 Do we want to implement the automatic build+upload process as in https://github.com/kentico-ericd/KInspector/blob/master/.github/workflows/dotnet-desktop.yml?

@JosefDvorak
Copy link
Collaborator Author

Thanks for catching that issue.

Yes, implementing build is the next step, but I wanted to make sure the PR is as small as possible. So that will be for the next one, after this one is reviewed by you. I've tested the commits you made, and everything works fine, so I think we're ready to merge, if you approve.

It looks like you already have most of the build script. Will you be able to update it for .NET 8 and make a PR, or would you like me to take that over?

@kentico-ericd kentico-ericd merged commit ffcef81 into Kentico:master Jan 16, 2024
1 check passed
@JosefDvorak JosefDvorak deleted the DotnetUpdate branch January 16, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request .NET Pull requests that update .net code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants