Skip to content

Commit 87f4b61

Browse files
committed
refactor: fixed issue with test data naming for linux testing
1 parent 69a6afe commit 87f4b61

File tree

4 files changed

+39
-6
lines changed

4 files changed

+39
-6
lines changed

.github/workflows/nuget-test-and-build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,39 @@ jobs:
7171
run: dotnet restore
7272
- name: Build
7373
run: dotnet build --no-restore --configuration release
74+
75+
# - name: Show current directory (debug)
76+
# run: |
77+
# echo "Current directory: $(pwd)"
78+
# - name: Show repo files (debug)
79+
# if: ${{ matrix.platform == 'ubuntu' }}
80+
# run: |
81+
# echo "Repo root: $(pwd)"
82+
# ls -la
83+
# echo "List _data:"
84+
# ls -la Kepware.Api.Test/_data || true
85+
# echo "List _data/projectLoadSerializeData:"
86+
# ls -la Kepware.Api.Test/_data/projectLoadSerializeData || true
87+
88+
# - name: Build test project (debug)
89+
# if: ${{ matrix.platform == 'ubuntu' }}
90+
# run: dotnet build Kepware.Api.Test/Kepware.Api.Test.csproj -c Release
91+
92+
# - name: Show build output (debug)
93+
# if: ${{ matrix.platform == 'ubuntu' }}
94+
# run: ls -la Kepware.Api.Test/bin/Release || true
95+
96+
# - name: Show TFM outputs (debug)
97+
# if: ${{ matrix.platform == 'ubuntu' }}
98+
# run: ls -la Kepware.Api.Test/bin/Release/* || true
99+
100+
# - name: Show test _data (debug)
101+
# if: ${{ matrix.platform == 'ubuntu' }}
102+
# run: ls -la Kepware.Api.Test/bin/Release/net8.0/_data || true
103+
# - name: Show test _data/projectLoadSerializeData (debug)
104+
# if: ${{ matrix.platform == 'ubuntu' }}
105+
# run: ls -la Kepware.Api.Test/bin/Release/net8.0/_data/projectLoadSerializeData || true
106+
74107
- name: Test
75108
run: dotnet test Kepware.Api.Test/Kepware.Api.Test.csproj --no-build --verbosity normal --configuration Release --logger "trx;LogFilePrefix=${{ matrix.platform }}-test-results"
76109
- name: Publish Test Reports (${{ matrix.platform }})

Kepware.Api.Test/ApiClient/_TestApiClientBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ protected async Task ConfigureToServeEndpoints(string filePath = "_data/simdemo_
226226
// Additional endpoints for content=serialize mocking
227227
var projectPropertiesString = await File.ReadAllTextAsync("_data/projectLoadSerializeData/projectProperties.json");
228228
var channel1String = await File.ReadAllTextAsync("_data/projectLoadSerializeData/Channel1.json");
229-
var sixteenBitDeviceString = await File.ReadAllTextAsync("_data/projectLoadSerializeData/dataTypeExamples.16BitDevice.json");
229+
var sixteenBitDeviceString = await File.ReadAllTextAsync("_data/projectLoadSerializeData/dataTypeExamples.16bitDevice.json");
230230
var simExamplesChannelString = await File.ReadAllTextAsync("_data/projectLoadSerializeData/simulationExamples.json");
231231
var dte8BitBRegTagGroupString = await File.ReadAllTextAsync("_data/projectLoadSerializeData/dte.8bitDevice.Breg.json");
232232
var dte8BitKRegTagGroupString = await File.ReadAllTextAsync("_data/projectLoadSerializeData/dte.8bitDevice.Kreg.json");

Kepware.Api.Test/Kepware.Api.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<Content Include="_data/**/*.*">
38-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
37+
<Content Include="_data/**">
38+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3939
</Content>
4040
</ItemGroup>
4141

Kepware.Api.TestIntg/Kepware.Api.TestIntg.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040

4141
<ItemGroup>
4242
<Content Include="appsettings.json">
43-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
43+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4444
</Content>
45-
<Content Include="_data/**/*.*">
46-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
45+
<Content Include="_data/**">
46+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4747
</Content>
4848
</ItemGroup>
4949

0 commit comments

Comments
 (0)