Skip to content

Commit bc4ae72

Browse files
committed
fixup! chore: add GitHub actions
1 parent 6c610a5 commit bc4ae72

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ jobs:
1919
dotnet-version: 8.0.x
2020
cache: true
2121
cache-dependency-path: '**/packages.lock.json'
22-
- name: Install dotnet format tool
23-
run: dotnet tool install -g dotnet-format
2422
- name: dotnet restore
25-
run: dotnet restore --locked-mode .\Coder.Desktop.sln
23+
run: dotnet restore --locked-mode
2624
- name: dotnet format
27-
run: dotnet format --verify-no-changes --no-restore .\Coder.Desktop.sln
25+
run: dotnet format --verify-no-changes --no-restore
2826

2927
test:
3028
runs-on: windows-latest
@@ -35,10 +33,11 @@ jobs:
3533
with:
3634
dotnet-version: 8.0.x
3735
cache: true
36+
cache-dependency-path: '**/packages.lock.json'
3837
- name: dotnet restore
39-
run: dotnet restore --locked-mode .\Coder.Desktop.sln
38+
run: dotnet restore --locked-mode
4039
- name: dotnet test
41-
run: dotnet test --no-restore .\Coder.Desktop.sln
40+
run: dotnet test --no-restore
4241

4342
build:
4443
runs-on: windows-latest
@@ -49,12 +48,13 @@ jobs:
4948
with:
5049
dotnet-version: 8.0.x
5150
cache: true
51+
cache-dependency-path: '**/packages.lock.json'
5252
- name: dotnet restore
53-
run: dotnet restore --locked-mode .\Coder.Desktop.sln
53+
run: dotnet restore --locked-mode
5454
- name: dotnet build
55-
run: dotnet build .\Coder.Desktop.sln
55+
run: dotnet build
5656
- name: dotnet publish
57-
run: dotnet publish .\Coder.Desktop.sln -c Release -o .\publish
57+
run: dotnet publish --no-restore --configuration Release --output .\publish
5858
- name: Upload artifact
5959
uses: actions/upload-artifact@v4
6060
with:

CoderSdk/CoderApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Text;
1+
using System.Text;
22
using System.Text.Json;
33
using System.Text.Json.Serialization;
44

Vpn.Proto/RpcMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Reflection;
1+
using System.Reflection;
22
using Google.Protobuf;
33

44
namespace Coder.Desktop.Vpn.Proto;

Vpn.Proto/RpcVersion.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Coder.Desktop.Vpn.Proto;
1+
namespace Coder.Desktop.Vpn.Proto;
22

33
/// <summary>
44
/// A version of the RPC API. Can be compared other versions to determine compatibility between two peers.
@@ -152,12 +152,12 @@ public void Validate()
152152
{
153153
RpcVersion? bestVersion = null;
154154
foreach (var v1 in this)
155-
foreach (var v2 in other)
156-
if (v1.Major == v2.Major && (bestVersion is null || v1.Major > bestVersion.Major))
157-
{
158-
var v = v1.IsCompatibleWith(v2);
159-
if (v is not null) bestVersion = v;
160-
}
155+
foreach (var v2 in other)
156+
if (v1.Major == v2.Major && (bestVersion is null || v1.Major > bestVersion.Major))
157+
{
158+
var v = v1.IsCompatibleWith(v2);
159+
if (v is not null) bestVersion = v;
160+
}
161161

162162
return bestVersion;
163163
}

Vpn.Service/ManagerService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.Extensions.Hosting;
1+
using Microsoft.Extensions.Hosting;
22
using Microsoft.Extensions.Logging;
33

44
namespace Coder.Desktop.Vpn.Service;

Vpn/Serdes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Buffers.Binary;
1+
using System.Buffers.Binary;
22
using Coder.Desktop.Vpn.Proto;
33
using Coder.Desktop.Vpn.Utilities;
44
using Google.Protobuf;

Vpn/Speaker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Collections.Concurrent;
1+
using System.Collections.Concurrent;
22
using System.Text;
33
using Coder.Desktop.Vpn.Proto;
44
using Coder.Desktop.Vpn.Utilities;
@@ -195,7 +195,7 @@ private async Task ReceiveLoop(CancellationToken ct = default)
195195
while (!ct.IsCancellationRequested)
196196
{
197197
var message = await _serdes.ReadMessage(_conn, ct);
198-
if (message is { RpcField.ResponseTo : not 0 })
198+
if (message is { RpcField.ResponseTo: not 0 })
199199
{
200200
// Look up the TaskCompletionSource for the message ID and
201201
// complete it with the message.

0 commit comments

Comments
 (0)