-
Notifications
You must be signed in to change notification settings - Fork 639
Update GitHub actions #557
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
base: main
Are you sure you want to change the base?
Conversation
Action is compatible with <6.1.0 only.
GitVersion relies on dotnet, this permits running on act locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the GitHub Actions workflow for .NET projects.
- Removes the defaults block for run shell configuration.
- Adds a new Setup .NET step to support both .NET 6 and 7.
- Updates versions for GitVersion, artifact actions, and adjusts the operating system matrix.
Comments suppressed due to low confidence (4)
.github/workflows/dotnet.yml:40
- Confirm that pinning GitVersion to '6.0.x' instead of '6.x' aligns with your intended version compatibility requirements.
versionSpec: '6.0.x'
.github/workflows/dotnet.yml:74
- Double-check that replacing 'macos-latest' with 'macos-13' fully supports all dependent steps and test environments.
os: [windows-latest, ubuntu-latest, macos-13]
.github/workflows/dotnet.yml:33
- Ensure that the multi-line specification for multiple .NET versions is supported by actions/setup-dotnet@v3 and behaves as expected during the workflow execution.
dotnet-version: |
6.x
7.x
.github/workflows/dotnet.yml:100
- [nitpick] Verify that using a negated ACT environment variable as the condition for caching is logically sound and covers all your intended scenarios.
if: ${{ !env.ACT }}
I think we had a similar issue in the recent past: the ports used are not that eagerly freed, so that if a fixed port is used, it can happen that it's still considered in use. There are (atleast) two unreliable solutions:
what's the best way to provide you a fix suggestion? |
[TestClass]
public partial class S7NetTests : IDisposable
{
#region Constants
const int DB2 = 2;
const int DB4 = 4;
const short TestServerPortStart = 31122;
const string TestServerIp = "127.0.0.1";
#endregion
#region Private fields
Plc plc;
private readonly short testServerPort;
#endregion
private static readonly object _lock = new();
private static short currentTestServerPort = TestServerPortStart;
#region Constructor
/// <summary>
/// Create a plc that will connect to localhost (Snap 7 server) and connect to it
/// </summary>
public S7NetTests()
{
lock (_lock)
{
currentTestServerPort++;
testServerPort = currentTestServerPort;
}
plc = CreatePlc(testServerPort);
}
private static Plc CreatePlc(short port)
{
return new Plc(CpuType.S7300, TestServerIp, port, 0, 2);
}
[TestInitialize]
public void Setup()
{
S7TestServer.Start(testServerPort);
plc.Open();
} |
No description provided.