ci: add macOS app validation pipeline
This commit is contained in:
28
scripts/ci/test.sh
Executable file
28
scripts/ci/test.sh
Executable 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
|
||||
Reference in New Issue
Block a user