Compare commits

...

3 Commits

Author SHA1 Message Date
James Wampler
a81798cffe Pin MessagePack to patched 2.5.302 in AppHost
Some checks failed
CI / build-and-push (push) Failing after 45s
CI / deploy-qa (push) Has been skipped
Aspire.Hosting.PostgreSQL/JavaScript pull in MessagePack 2.5.192
transitively, which has multiple known vulnerabilities and fails the
build with TreatWarningsAsErrors. Pinned a direct reference to the
patched 2.5.302 (same major, no API break).
2026-07-02 13:01:37 -07:00
James Wampler
926af91389 Pin Microsoft.OpenApi to patched 2.9.0 to fix NU1903 build failure
Microsoft.AspNetCore.OpenApi 10.0.5 pulls in Microsoft.OpenApi 2.0.0
transitively, which has a known high-severity vulnerability
(GHSA-v5pm-xwqc-g5wc) and fails the build with TreatWarningsAsErrors.
Pinned a direct reference to the patched 2.9.0 (still 2.x, API-compatible).
2026-07-02 13:00:59 -07:00
James Wampler
37ac4b47f2 Auto-install .NET SDK in CI scripts when runner lacks it
Some checks failed
CI / build-and-push (push) Failing after 12s
CI / deploy-qa (push) Has been skipped
Gitea runner build failed with "dotnet: command not found". Added
ensure_dotnet() to lib.sh, using the vendored dotnet-install.sh to
bootstrap the SDK into .dotnet/ when not already on PATH, called from
build.sh/test.sh/prepush.sh. Also trigger CI on build-runner-fix to
verify the fix.
2026-07-02 12:50:19 -07:00
8 changed files with 29 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ name: CI
on: on:
push: push:
branches: [main] branches: [main, build-runner-fix]
jobs: jobs:
build-and-push: build-and-push:

3
.gitignore vendored
View File

@@ -468,3 +468,6 @@ lerna-debug.log*
# Windows thumbnail cache # Windows thumbnail cache
Thumbs.db Thumbs.db
ehthumbs.db ehthumbs.db
# Self-installed .NET SDK (scripts/ci/lib.sh ensure_dotnet, used when a CI runner lacks the SDK)
/.dotnet/

View File

@@ -6,6 +6,8 @@ set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh
cd "$CI_ROOT" cd "$CI_ROOT"
ensure_dotnet
log "Restoring and publishing MicCheck.Api (Release)" log "Restoring and publishing MicCheck.Api (Release)"
dotnet publish src/api/MicCheck.Api/MicCheck.Api.csproj -c Release dotnet publish src/api/MicCheck.Api/MicCheck.Api.csproj -c Release

View File

@@ -37,6 +37,23 @@ image_names() {
ADMIN_IMAGE="$REGISTRY/$REGISTRY_OWNER/miccheck-admin" ADMIN_IMAGE="$REGISTRY/$REGISTRY_OWNER/miccheck-admin"
} }
# Installs .NET into $CI_ROOT/.dotnet via the vendored dotnet-install.sh if
# `dotnet` isn't already on PATH, then prepends it to PATH for this process.
# Keeps bare runners (no SDK preinstalled) working the same as a dev machine.
ensure_dotnet() {
if command -v dotnet > /dev/null 2>&1; then
return 0
fi
local install_dir="$CI_ROOT/.dotnet"
if [[ ! -x "$install_dir/dotnet" ]]; then
log "dotnet not found on PATH; installing .NET SDK via dotnet-install.sh"
bash "$CI_ROOT/dotnet-install.sh" --channel LTS --install-dir "$install_dir"
fi
export PATH="$install_dir:$PATH"
export DOTNET_ROOT="$install_dir"
}
registry_login() { registry_login() {
require_registry_vars require_registry_vars
[[ -n "$REGISTRY_USER" ]] || fail "REGISTRY_USER env var is required to push images" [[ -n "$REGISTRY_USER" ]] || fail "REGISTRY_USER env var is required to push images"

View File

@@ -5,6 +5,8 @@ set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh
cd "$CI_ROOT" cd "$CI_ROOT"
ensure_dotnet
log "Building full solution (Debug)" log "Building full solution (Debug)"
dotnet build MicCheck.slnx -c Debug dotnet build MicCheck.slnx -c Debug

View File

@@ -6,6 +6,8 @@ set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh
cd "$CI_ROOT" cd "$CI_ROOT"
ensure_dotnet
log "Running MicCheck.Api.Tests.Unit" log "Running MicCheck.Api.Tests.Unit"
dotnet test tests/api/MicCheck.Api.Tests.Unit/MicCheck.Api.Tests.Unit.csproj -c Release --logger trx dotnet test tests/api/MicCheck.Api.Tests.Unit/MicCheck.Api.Tests.Unit.csproj -c Release --logger trx

View File

@@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Aspire.Hosting.JavaScript" Version="13.4.2" /> <PackageReference Include="Aspire.Hosting.JavaScript" Version="13.4.2" />
<PackageReference Include="Aspire.Hosting.PostgreSQL" Version="13.4.0" /> <PackageReference Include="Aspire.Hosting.PostgreSQL" Version="13.4.0" />
<PackageReference Include="MessagePack" Version="2.5.302" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>

View File

@@ -12,6 +12,7 @@
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" /> <PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.5" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.5" />
<PackageReference Include="Microsoft.OpenApi" Version="2.9.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.5" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.5" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.5"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.5">