ci: add macOS app validation pipeline

This commit is contained in:
Brent Perteet
2026-08-24 17:05:43 -05:00
parent db2439c52e
commit e22ae29b3f
4 changed files with 149 additions and 0 deletions

28
scripts/ci/test.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
dotnet_bin="${DOTNET_TEST_BIN:-/usr/local/share/dotnet/dotnet}"
results_dir="${repo_dir}/artifacts/test-results"
nuget_cache="${UM_TRACE_NUGET_CACHE:-${TMPDIR:-/tmp}/um-trace-ci-nuget}"
mkdir -p "${results_dir}" "${nuget_cache}/http-cache"
export NUGET_HTTP_CACHE_PATH="${NUGET_HTTP_CACHE_PATH:-${nuget_cache}/http-cache}"
test_projects=(
"tests/FieldLogger.Sync.Tests/FieldLogger.Sync.Tests.csproj"
"tests/FieldLogger.Tests/FieldLogger.Tests.csproj"
"tests/IfLoc.Sim.Tests/IfLoc.Sim.Tests.csproj"
)
for project in "${test_projects[@]}"; do
project_name="$(basename "${project}" .csproj)"
DOTNET_ROOT=/usr/local/share/dotnet "${dotnet_bin}" restore "${repo_dir}/${project}" \
-p:NuGetAudit=false
DOTNET_ROOT=/usr/local/share/dotnet "${dotnet_bin}" test "${repo_dir}/${project}" \
--configuration Release \
--no-restore \
--logger "trx;LogFileName=${project_name}.trx" \
--results-directory "${results_dir}"
done