Skip to content

Commit 32a3830

Browse files
committed
fix build and format
1 parent e0b31c2 commit 32a3830

40 files changed

+2235
-2101
lines changed

.github/workflows/dotnet.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,30 @@ name: .NET
22

33
on:
44
push:
5-
branches: [ main, dev/* ]
5+
branches: [main, dev/*]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main, dev/*]
88

99
jobs:
1010
build:
11-
1211
runs-on: ${{ matrix.os }}
1312
strategy:
1413
matrix:
15-
os: [ ubuntu-latest, windows-latest, macos-latest ]
14+
os: [ubuntu-latest, windows-latest, macos-latest]
1615

1716
steps:
18-
- uses: actions/checkout@v4
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
21-
with:
22-
dotnet-version: '9.0.x'
23-
- name: Restore dependencies
24-
run: dotnet restore "src/Apache.IoTDB/Apache.IoTDB.csproj"
25-
- name: Check License Header
26-
# skywalking-eyes doesn't support windows
27-
if: runner.os == 'Linux'
28-
uses: apache/[email protected]
29-
- name: Build
30-
run: dotnet build --no-restore "src/Apache.IoTDB/Apache.IoTDB.csproj"
31-
- name: Test
32-
run: dotnet test --no-build --verbosity normal "tests/Apache.IoTDB.Tests/Apache.IoTDB.Tests.csproj"
17+
- uses: actions/checkout@v4
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: "9.0.x"
22+
- name: Restore dependencies
23+
run: dotnet restore "src/Apache.IoTDB/Apache.IoTDB.csproj"
24+
- name: Check License Header
25+
# skywalking-eyes doesn't support windows
26+
if: runner.os == 'Linux'
27+
uses: apache/[email protected]
28+
- name: Build
29+
run: dotnet build --no-restore "src/Apache.IoTDB/Apache.IoTDB.csproj"
30+
- name: Test
31+
run: dotnet test --no-build --verbosity normal "tests/Apache.IoTDB.Tests/Apache.IoTDB.Tests.csproj"

.github/workflows/e2e-multinode.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ name: E2E Tests in MultiNode IoTDB
22

33
on:
44
push:
5-
branches: [ main, dev/* ]
5+
branches: [main, dev/*]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main, dev/*]
88

99
jobs:
10-
1110
build:
1211
name: e2e test in MultiNode IoTDB
1312
runs-on: ubuntu-latest
1413
steps:
14+
- name: Check out code into the CSharp module directory
15+
uses: actions/checkout@v4
1516

16-
- name: Check out code into the CSharp module directory
17-
uses: actions/checkout@v4
18-
19-
- name: Set Docker & Run Test
20-
run: |
21-
docker compose -f docker-compose-2c2d.yml up --build --abort-on-container-exit --remove-orphans
17+
- name: Set Docker & Run Test
18+
run: |
19+
docker compose -f docker-compose-2c2d.yml up --build --abort-on-container-exit --remove-orphans
2220
23-
- name: Clean IoTDB & Shut Down Docker
24-
run: |
25-
docker compose -f docker-compose-2c2d.yml down
21+
- name: Clean IoTDB & Shut Down Docker
22+
run: |
23+
docker compose -f docker-compose-2c2d.yml down

.github/workflows/e2e.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ name: E2E Tests
22

33
on:
44
push:
5-
branches: [ main, dev/* ]
5+
branches: [main, dev/*]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main, dev/*]
88

99
jobs:
10-
1110
build:
1211
name: e2e test
1312
runs-on: ubuntu-latest
1413
steps:
14+
- name: Check out code into the CSharp module directory
15+
uses: actions/checkout@v4
1516

16-
- name: Check out code into the CSharp module directory
17-
uses: actions/checkout@v4
18-
19-
- name: Set Docker & Run Test
20-
run: |
21-
docker network create --subnet 172.18.0.0/24 iotdb-network && docker compose -f docker-compose.yml up --build --abort-on-container-exit --remove-orphans
17+
- name: Set Docker & Run Test
18+
run: |
19+
docker network create --subnet 172.18.0.0/24 iotdb-network && docker compose -f docker-compose.yml up --build --abort-on-container-exit --remove-orphans
2220
23-
- name: Clean IoTDB & Shut Down Docker
24-
run: |
25-
docker compose -f docker-compose.yml down
21+
- name: Clean IoTDB & Shut Down Docker
22+
run: |
23+
docker compose -f docker-compose.yml down

Apache.IoTDB.sln

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{DEAC57D3-4
2626
docs\time_profile_zh.pdf = docs\time_profile_zh.pdf
2727
EndProjectSection
2828
EndProject
29-
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{4D457769-80CB-401F-9155-C3125C04FACD}"
30-
EndProject
3129
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.IoTDB.Data", "src\Apache.IoTDB.Data\Apache.IoTDB.Data.csproj", "{4308656F-D174-49A6-ACE4-15894B017D55}"
3230
EndProject
3331
Global

samples/Apache.IoTDB.Samples/Program.cs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,46 +35,46 @@ public static async Task Main(string[] args)
3535
() => "localhost",
3636
description: "Use single endpoint (e.g. --single localhost)");
3737

38-
var multiOption = new Option<List<string>>(
39-
"--multi",
40-
description: "Use multiple endpoints (e.g. --multi localhost:6667 localhost:6668)")
41-
{
42-
AllowMultipleArgumentsPerToken = true
43-
};
38+
var multiOption = new Option<List<string>>(
39+
"--multi",
40+
description: "Use multiple endpoints (e.g. --multi localhost:6667 localhost:6668)")
41+
{
42+
AllowMultipleArgumentsPerToken = true
43+
};
4444

45-
var rootCommand = new RootCommand
45+
var rootCommand = new RootCommand
4646
{
4747
singleOption,
4848
multiOption
4949
};
5050

51-
rootCommand.SetHandler(async (string single, List<string> multi) =>
52-
{
53-
var utilsTest = new UtilsTest();
54-
utilsTest.TestParseEndPoint();
51+
rootCommand.SetHandler(async (string single, List<string> multi) =>
52+
{
53+
var utilsTest = new UtilsTest();
54+
utilsTest.TestParseEndPoint();
5555

56-
SessionPoolTest sessionPoolTest;
56+
SessionPoolTest sessionPoolTest;
5757

58-
if (!string.IsNullOrEmpty(single) && (multi == null || multi.Count == 0))
59-
{
60-
sessionPoolTest = new SessionPoolTest(single);
61-
}
62-
else if (multi != null && multi.Count != 0)
63-
{
64-
sessionPoolTest = new SessionPoolTest(multi);
65-
}
66-
else
67-
{
68-
Console.WriteLine("Please specify either --single or --multi endpoints.");
69-
return;
70-
}
58+
if (!string.IsNullOrEmpty(single) && (multi == null || multi.Count == 0))
59+
{
60+
sessionPoolTest = new SessionPoolTest(single);
61+
}
62+
else if (multi != null && multi.Count != 0)
63+
{
64+
sessionPoolTest = new SessionPoolTest(multi);
65+
}
66+
else
67+
{
68+
Console.WriteLine("Please specify either --single or --multi endpoints.");
69+
return;
70+
}
7171

72-
await sessionPoolTest.Test();
72+
await sessionPoolTest.Test();
7373

7474

75-
}, singleOption, multiOption);
75+
}, singleOption, multiOption);
7676

77-
await rootCommand.InvokeAsync(args);
77+
await rootCommand.InvokeAsync(args);
7878
}
7979

8080
public static void OpenDebugMode(this SessionPool session)

0 commit comments

Comments
 (0)