Skip to content

Add CI smoke test that consumes packed nupkg and asserts /_content/{Module}/{Module}.pages.js returns 200 #135

@antosubash

Description

@antosubash

The 0.0.33 release shipped every Microsoft.NET.Sdk.StaticWebAssets module without its staticwebassets/ folder — dotnet pack ran on a clean CI checkout where wwwroot/ had never been built (no npm run build step before pack). The DLL shipped fine; the React UI 404'd.

Fixed in 0.0.34, but the regression was completely invisible to existing tests because template/SimpleModule.Host consumes modules via ProjectReference to local sources where wwwroot/ is populated from previous dev runs. Real consumers via NuGet hit the broken build.

Fix

Post-pack CI step that:

  1. Copies the packed .nupkgs into a temporary local NuGet feed
  2. dotnet new a minimal smoke-test app that consumes them
  3. Boots the app
  4. curl http://localhost:.../_content/SimpleModule.Users/SimpleModule.Users.pages.js → assert 200
  5. Repeat for each module that uses Microsoft.NET.Sdk.StaticWebAssets

This catches the entire class of "build pipeline forgot to run JS build" regressions before they ship. Cost: one CI job, minutes of runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions