maksit-cluster-console/utils/templates/build/ci-dotnet-pack.sh
Maksym Sadovnychyy bff0d5aeef (feature): init
2026-08-19 21:27:38 +02:00

14 lines
635 B
Bash

#!/bin/sh
set -eu
: "${ARTIFACTS_DIR:=/artifacts}"
mkdir -p "$ARTIFACTS_DIR" /testResults
# Customize test/pack .csproj paths (see templates/Dockerfile.ci.dotnet).
# Requires src/global.json (solution root) with test.runner = Microsoft.Testing.Platform and coverlet.MTP on the test project.
dotnet test path/to/YourProject.Tests/YourProject.Tests.csproj -c Release \
--coverlet --coverlet-output-format cobertura --coverlet-include "[MaksIT.*]*" \
--results-directory /testResults
dotnet pack path/to/YourProject/YourProject.csproj -c Release -o "$ARTIFACTS_DIR" --nologo \
-p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg