dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.73k stars 431 forks source link

[tests] Install node+npm on CI build machines #4508

Open radical opened 3 months ago

radical commented 3 months ago

This is needed for Aspire.Hosting.Tests.Node.NodeFunctionalTests.VerifyNodeAppWorks, which started running with https://github.com/dotnet/aspire/pull/4500/ .

fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start a process {"Executable": {"name":"npmapp_598acd4d"}, "Reconciliation": 3, "error": "exec: \"npm\": executable file not found in $PATH"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable    {"Executable": {"name":"npmapp_598acd4d"}, "Reconciliation": 3, "error": "exec: \"npm\": executable file not found in $PATH"}

Linux: npm is missing Windows: npm, and node are missing

cc @RussKie @joperezr

radical commented 3 months ago

@ReubenBond In such tests we should detect when node/npm did not start and fail the test with a corresponding error. What would be needed for that?

radical commented 3 months ago

Opened https://github.com/dotnet/dnceng/issues/3091 .