@@ -17,17 +17,18 @@ permissions:
1717 pull-requests : write
1818
1919env :
20+ STEELTOE_MACOS_DIAGNOSE_HOSTNAME_LOOKUP : true
2021 DOTNET_CLI_TELEMETRY_OPTOUT : 1
2122 DOTNET_NOLOGO : true
22- SOLUTION_FILE : ' src/Steeltoe.All.sln '
23+ SOLUTION_FILE : ' src/Steeltoe.All.slnx '
2324 COMMON_TEST_ARGS : >-
24- --no-build --configuration Release --collect "XPlat Code Coverage" --logger trx --results-directory ${{ github.workspace }}/dumps
25- --settings coverlet.runsettings --blame-crash --blame-hang-timeout 3m
25+ --no-build --configuration Release --collect "XPlat Code Coverage" --logger trx --results-directory ${{ github.workspace }}/TestOutput
26+ --settings coverlet.runsettings --blame-crash --blame-hang-timeout 1m
2627
2728jobs :
28- analyze :
29+ build :
2930 name : Build and Test
30- timeout-minutes : 30
31+ timeout-minutes : 60
3132 strategy :
3233 fail-fast : false
3334 matrix :
@@ -36,11 +37,10 @@ jobs:
3637 - os : ubuntu-latest
3738 runDockerContainers : true
3839 - os : windows-latest
39- skipFilter : Category!=Integration
40+ skipIntegrationTests : true
4041 - os : macos-latest
41- skipFilter : Category!=Integration&Category!=SkipOnMacOS
42+ skipIntegrationTests : true
4243 runs-on : ${{ matrix.os }}
43- continue-on-error : true
4444
4545 services :
4646 eurekaServer :
@@ -54,16 +54,24 @@ jobs:
5454 eureka.client.serviceUrl.defaultZone : http://eurekaServer:8761/eureka
5555 eureka.instance.hostname : localhost
5656 eureka.instance.instanceId : localhost:configServer:8888
57+ encrypt.keyStore.location : file:///workspace/server.jks
58+ encrypt.keyStore.password : letmein
59+ encrypt.keyStore.alias : mytestkey
60+ encrypt.rsa.algorithm : OAEP
61+ encrypt.rsa.salt : deadbeef
62+ encrypt.rsa.strong : " false"
63+ options : --name steeltoe-config
5764 ports :
5865 - 8888:8888
5966
6067 steps :
6168 - name : Setup .NET
62- uses : actions/setup-dotnet@v4
69+ uses : actions/setup-dotnet@v5
6370 with :
6471 dotnet-version : |
6572 8.0.*
6673 9.0.*
74+ 10.0.*
6775
6876 - name : Turn off dev certificate (macOS only)
6977 if : ${{ matrix.os == 'macos-latest' }}
@@ -73,52 +81,51 @@ jobs:
7381 # When that happens, select 'Always Allow' to grant 'dotnet' access to the certificate key in the future.
7482 # and the test run fails, but without indicating which test caused it. By setting this, the causing test fails with the next message:
7583 # Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
76- # To prevent the causing test from failing the test run, disable it on macOS by adding [Trait("Category", "SkipOnMacOS")] .
84+ # To prevent the causing test from failing the test run, disable it on macOS using FactSkippedOnPlatform/TheorySkippedOnPlatform .
7785 shell : bash
7886 run : echo "DOTNET_GENERATE_ASPNET_CERTIFICATE=false" >> $GITHUB_ENV
7987
8088 - name : Git checkout
81- uses : actions/checkout@v4
89+ uses : actions/checkout@v6
8290 with :
8391 persist-credentials : false
8492
85- - name : Restore packages
86- run : dotnet restore ${{ env.SOLUTION_FILE }} /p:Configuration=Release --verbosity minimal
87-
88- - name : Build solution
89- run : dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal
90-
91- - name : Set skip filters for tests
93+ - name : Provide jks file for Config Server container
94+ if : ${{ matrix.runDockerContainers }}
95+ # The Config Server container starts before checkout, when server.jks is not yet available.
96+ # Copy it into the container now and restart so Config Server can pick up the keystore.
9297 shell : bash
9398 run : |
94- echo SKIP_FILTER_NO_MEMORY_DUMPS="${{ matrix.skipFilter && format('{0}&Category!=MemoryDumps', matrix.skipFilter) || 'Category!=MemoryDumps' }}" >> $GITHUB_ENV
95- echo SKIP_FILTER_WITH_MEMORY_DUMPS="${{ matrix.skipFilter && format('{0}&Category=MemoryDumps', matrix.skipFilter) || 'Category=MemoryDumps' }}" >> $GITHUB_ENV
99+ docker cp src/Configuration/test/Encryption.Test/Cryptography/server.jks steeltoe-config:/workspace/server.jks
100+ docker restart steeltoe-config
96101
97- - name : Test (net8.0)
98- run : dotnet test ${{ env.SOLUTION_FILE }} --framework net8.0 --filter "${{ env.SKIP_FILTER_NO_MEMORY_DUMPS }}" ${{ env.COMMON_TEST_ARGS }}
102+ - name : Restore packages
103+ run : dotnet restore ${{ env.SOLUTION_FILE }} /p:Configuration=Release /p:NuGetAudit=false --verbosity minimal
99104
100- - name : Test (net8.0) (memory dumps)
101- run : dotnet test ${{ env.SOLUTION_FILE }} --framework net8.0 --filter "${{ env.SKIP_FILTER_WITH_MEMORY_DUMPS }}" ${{ env.COMMON_TEST_ARGS }}
105+ - name : Build solution
106+ run : dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal
102107
103- - name : Test (net9.0)
104- run : dotnet test ${{ env.SOLUTION_FILE }} --framework net9.0 --filter "${{ env.SKIP_FILTER_NO_MEMORY_DUMPS }}" ${{ env.COMMON_TEST_ARGS }}
108+ - name : Test
109+ id : test
110+ run : dotnet test ${{ env.SOLUTION_FILE }} --filter "${{ matrix.skipIntegrationTests == true && 'Category!=MemoryDumps&Category!=Integration' || 'Category!=MemoryDumps' }}" ${{ env.COMMON_TEST_ARGS }}
105111
106- - name : Test (net9.0) (memory dumps)
107- run : dotnet test ${{ env.SOLUTION_FILE }} --framework net9.0 --filter "${{ env.SKIP_FILTER_WITH_MEMORY_DUMPS }}" ${{ env.COMMON_TEST_ARGS }}
112+ - name : Test (memory dumps)
113+ id : test-memory-dumps
114+ run : dotnet test src/Management/test/Endpoint.Test --filter "Category=MemoryDumps" ${{ env.COMMON_TEST_ARGS }}
108115
109116 - name : Upload crash/hang dumps (on failure)
110- if : ${{ failure( ) }}
111- uses : actions/upload-artifact@v4
117+ if : ${{ !cancelled() && (steps.test.outcome == 'failure' || steps.test-memory-dumps.outcome == 'failure' ) }}
118+ uses : actions/upload-artifact@v7
112119 with :
113120 name : FailedTestOutput-${{ matrix.os }}
114121 path : |
115- ${{ github.workspace }}/dumps /**/*.dmp
116- ${{ github.workspace }}/dumps /**/Sequence_*.xml
122+ ${{ github.workspace }}/TestOutput /**/*.dmp
123+ ${{ github.workspace }}/TestOutput /**/Sequence_*.xml
117124 if-no-files-found : ignore
118125
119126 - name : Report test results
120- if : ${{ !cancelled() }}
121- uses : dorny/test-reporter@v2
127+ if : ${{ !cancelled() && (steps.test.outcome != 'skipped' || steps.test-memory-dumps.outcome != 'skipped') }}
128+ uses : dorny/test-reporter@v3
122129 with :
123130 name : ${{ matrix.os }} test results
124131 reporter : dotnet-trx
0 commit comments