From 1c2405b25a9f69da00f97f782c8482876affac28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 20 Nov 2024 13:10:15 +0100 Subject: [PATCH] Adjust CI to execute scripts tests against .net9 --- .github/workflows/build-container.yml | 4 ++-- .github/workflows/build.yml | 8 ++++---- .github/workflows/release-publish.yml | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 144f91a436..4095bc32f4 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -43,10 +43,10 @@ jobs: docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" ./docker docker run --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project --rm mybuildimage /bin/sh -c ' set -e - dotnet publish -f net8.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke + dotnet publish -f net9.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home" . ./instrument.sh - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/publish/TestApplication.Smoke + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/publish/TestApplication.Smoke test "$(ls -A /var/log/opentelemetry/dotnet )" ' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6d4cacf77..9c5eda3a0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,10 +101,10 @@ jobs: shell: bash run: | set -e - dotnet publish -f net8.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke + dotnet publish -f net9.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home" . ./instrument.sh - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/publish/TestApplication.Smoke + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/publish/TestApplication.Smoke test "$(ls -A '${{ matrix.log-dir }}' )" - name: Test the Windows PowerShell module instructions from README.md @@ -115,12 +115,12 @@ jobs: Import-Module "${PWD}/bin/installation-scripts/OpenTelemetry.DotNet.Auto.psm1" [System.Environment]::SetEnvironmentVariable("OTEL_DOTNET_AUTO_INSTALL_DIR", "${PWD}/bin/tracer-home", [System.EnvironmentVariableTarget]::Machine) Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName" - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/TestApplication.Smoke.exe + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/TestApplication.Smoke.exe if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." } Remove-Item $log_path Unregister-OpenTelemetryForCurrentSession - ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net8.0/TestApplication.Smoke.exe + ./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/TestApplication.Smoke.exe if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." } diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 472044104c..811c4b0804 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -22,7 +22,7 @@ jobs: mkdir testapp cd testapp dotnet new console - dotnet publish -f net8.0 -c Release + dotnet publish -f net9.0 -c Release $module_url = "https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/OpenTelemetry.DotNet.Auto.psm1" $dl_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1" $log_path = "C:\ProgramData\OpenTelemetry .NET AutoInstrumentation\logs\*" @@ -31,12 +31,12 @@ jobs: Install-OpenTelemetryCore $install_dir = Get-OpenTelemetryInstallDirectory Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName" - ./bin/Release/net8.0/publish/testapp + ./bin/Release/net9.0/publish/testapp if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." } Remove-Item $log_path Unregister-OpenTelemetryForCurrentSession - ./bin/Release/net8.0/publish/testapp + ./bin/Release/net9.0/publish/testapp if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" } if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." } Uninstall-OpenTelemetryCore @@ -85,13 +85,13 @@ jobs: mkdir testapp cd testapp dotnet new console - dotnet publish -f net8.0 -c Release + dotnet publish -f net9.0 -c Release curl -sSfL https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/otel-dotnet-auto-install.sh -O sh ./otel-dotnet-auto-install.sh test "$(ls -A "$HOME/.otel-dotnet-auto")" curl -sSfL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/instrument.sh -O . ./instrument.sh - ./bin/Release/net8.0/publish/testapp + ./bin/Release/net9.0/publish/testapp test "$(ls -A '${{ matrix.log-dir }}' )" shell-scripts-container: