Skip to content

Enable container tests #48910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions build/RunTestsOnHelix.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
#!/usr/bin/env bash

install_dependencies() {
echo "Installing dependencies..."

if [ -f /etc/os-release ]; then
. /etc/os-release
echo "Detected OS: $ID $VERSION_ID"

case "$ID" in
centos|rhel)
sudo dnf install -y epel-release || { echo "Failed to install epel-release"; exit 1; }
sudo dnf config-manager --set-enabled crb || { echo "Failed to enable CRB repository"; exit 1; }
sudo dnf install -y zlib-devel libunwind || { echo "Failed to install dependencies"; exit 1; }
;;
fedora)
sudo dnf install -y clang || { echo "Failed to install clang"; exit 1; }
;;
alpine)
sudo apk add --no-cache clang || { echo "Failed to install clang"; exit 1; }
;;
*)
echo "Unsupported OS: $ID. Please install dependencies manually."
exit 1
;;
esac
else
echo "/etc/os-release not found. Cannot determine OS."
exit 1
fi

echo "Dependencies installation complete."
}

install_dependencies

# make NuGet network operations more robust
export NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY=true
export NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT=6
Expand Down
15 changes: 4 additions & 11 deletions eng/pipelines/templates/jobs/sdk-job-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,14 @@ parameters:
runTests: true
- categoryName: ContainerBased
container: fedora39
# No fedora Helix container is available, so use the ubuntu one instead.
helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64
helixTargetContainer: $(helixTargetContainerPrefix)fedora-41-helix-amd64
osProperties: $(linuxOsPortableProperties)
# Skipping all container-based testing for now.
# See: https://github.com/dotnet/sdk/issues/40935
runTests: false
runTests: true
- categoryName: ContainerBased
container: centosStream9
helixTargetContainer: $(helixTargetContainerPrefix)centos-stream9-helix
osProperties: /p:OSName=linux
# Skipping all container-based testing for now.
# See: https://github.com/dotnet/sdk/issues/40935
runTests: false
runTests: true
- categoryName: ContainerBased
container: debian12Amd64
helixTargetContainer: $(helixTargetContainerPrefix)debian-11-helix-amd64
Expand All @@ -61,9 +56,7 @@ parameters:
osProperties: /p:HostOSName=linux-musl
# SBOM generation is not supported for alpine.
enableSbom: false
# Skipping all container-based testing for now.
# See: https://github.com/dotnet/sdk/issues/40935
runTests: false
runTests: true
- categoryName: TemplateEngine
osProperties: $(linuxOsPortableProperties)
testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.DotNet.Cli.Workload.Restore.Tests;
Expand Down
Loading