diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9333fd5..d5cd704 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,19 +17,19 @@ jobs: config: - runtime: osx-x64 build_args: "" - os: ubuntu-latest + os: ubuntu-24.04 - runtime: osx-arm64 build_args: "" - os: ubuntu-latest + os: ubuntu-24.04 - runtime: linux-x64 build_args: --enable-aot - os: ubuntu-latest + os: ubuntu-24.04 - runtime: linux-arm64 build_args: --enable-aot - os: ubuntu-22.04 + os: ubuntu-24.04-arm - runtime: win-x64 build_args: --enable-aot - os: windows-latest + os: windows-2022 name: Build runs-on: ${{ matrix.config.os }} steps: @@ -41,19 +41,6 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - - name: Setup ARM64 Emulator - if: matrix.config.runtime == 'linux-arm64' - run: | - sudo dpkg --add-architecture arm64 - sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <> "$GITHUB_ENV" echo "pluginDownloadURL=http://localhost:8000/$artifactName" >> "$GITHUB_ENV" @@ -168,20 +231,21 @@ jobs: pluginChecksum: ${{ env.pluginChecksum }} e2e-windows: name: E2E testing on Windows - runs-on: windows-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2022, windows-2025] environment: E2E - needs: test + needs: test-windows steps: - name: Check out code into the project directory uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v4 + - uses: actions/download-artifact@v4 with: - dotnet-version: '8.0.x' - - name: Build Windows Binary - run: python3 ./scripts/build.py v0.0.1 win-x64 --enable-aot + name: windows-amd64-binary + path: ./bin/artifacts - name: Run download server locally run: | # wsl bash @@ -215,7 +279,7 @@ jobs: name: E2E testing on macOS runs-on: macos-13 environment: E2E - needs: test + needs: test-linux steps: - name: Check out code into the project directory uses: actions/checkout@v4 diff --git a/Notation.Plugin.AzureKeyVault.Tests/ProgramTests.cs b/Notation.Plugin.AzureKeyVault.Tests/ProgramTests.cs index 4a221bb..1615d9b 100644 --- a/Notation.Plugin.AzureKeyVault.Tests/ProgramTests.cs +++ b/Notation.Plugin.AzureKeyVault.Tests/ProgramTests.cs @@ -97,10 +97,10 @@ internal interface IResponseMock [Theory] [InlineData(200, "{\"error\":{\"message\":\"TestErrorMessage\"}}", "TestErrorMessage")] - [InlineData(500, "{\"error\":{\"message\":\"TestErrorMessage\"}", "Service request failed.\nStatus: 500\n")] - [InlineData(500, "{\"error2\":{\"message\":\"TestErrorMessage\"}}", "Service request failed.\nStatus: 500\n")] - [InlineData(500, "{\"error\":{\"message2\":\"TestErrorMessage\"}}", "Service request failed.\nStatus: 500\n")] - [InlineData(500, "{\"error\":{\"message\":\"\"}}", "\nStatus: 500\n")] + [InlineData(500, "{\"error\":{\"message\":\"TestErrorMessage\"}", "Status: 500")] + [InlineData(500, "{\"error2\":{\"message\":\"TestErrorMessage\"}}", "Status: 500")] + [InlineData(500, "{\"error\":{\"message2\":\"TestErrorMessage\"}}", "Status: 500")] + [InlineData(500, "{\"error\":{\"message\":\"\"}}", "Status: 500")] public void HandleAzureException(int code, string content, string expectedErrorMessage) { // Arrange @@ -124,7 +124,7 @@ public void HandleAzureException(int code, string content, string expectedErrorM var errorResponse = Program.HandleAzureException(exception); // Assert exit code 1 - Assert.StartsWith(expectedErrorMessage, errorResponse.ErrorMessage); + Assert.Contains(expectedErrorMessage, errorResponse.ErrorMessage); Assert.Equal("ERROR", errorResponse.ErrorCode); } }