fix(ci): run test projects on CI and drop impossible LowerStatReq tests

CI reported success despite two failing tests because the Test step ran
`dotnet test --no-restore`, but the Build step (BuildTool) only restores
and builds Application - never the test projects. Without a restore, the
test projects have no project.assets.json, so the Microsoft.NET.Test.Sdk
build targets aren't imported, the projects aren't recognized as test
projects, and `dotnet test` invokes the VSTest target against zero
projects: no output, exit 0. Failures were silently masked.

- Replace `--no-restore` with `dotnet test --logger trx --results-directory`
  on both the macOS and Linux jobs so the test projects restore and run.
- Add a guard that fails the job if no .trx is produced, as a permanent
  backstop against silent zero-test passes.

Also removes the two AosWeapon/AosArmor `EmitsLowerStatReqWhenPassed`
tests. PR #2501 deliberately emits LowerStatReq (1060435) inline in each
item, not in AosWeaponAttributes/AosArmorAttributes.GetProperties, which
no longer take a lowerStatReq argument. A prior "fix" dropped the argument
to make them compile but left the assertions expecting 1060435, so they
threw KeyNotFoundException at runtime. The "not emitted by GetProperties"
behavior stays covered by the sibling tests; the stale comments that
claimed lowerStatReq is passed in are removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-07-02 22:14:03 -07:00
parent e42a62b1d3
commit 326dc470de
4 changed files with 13 additions and 34 deletions

View file

@ -52,7 +52,12 @@ jobs:
- name: Migration Changes
run: git diff --exit-code ./**/Migrations/*.v*.json
- name: Test
run: dotnet test --no-restore
run: |
dotnet test --logger trx --results-directory ./TestResults
if [ -z "$(find ./TestResults -name '*.trx' 2>/dev/null)" ]; then
echo "::error::No test result files were produced - no test projects ran. Failing to avoid masking failures."
exit 1
fi
build-linux:
runs-on: ubuntu-latest
@ -106,4 +111,9 @@ jobs:
- name: Build
run: dotnet run --project Projects/BuildTool -- --config Release --skip-prereqs
- name: Test
run: dotnet test --no-restore
run: |
dotnet test --logger trx --results-directory ./TestResults
if [ -z "$(find ./TestResults -name '*.trx' 2>/dev/null)" ]; then
echo "::error::No test result files were produced - no test projects ran. Failing to avoid masking failures."
exit 1
fi