I’m building a small project that uses GitHub Actions to Build an ASP.NET Core web app.
Building a release artifact and then uploading it in a job works without problems. In the next job I want to download the artifact, run the production app “in the background” and test the running app with Newman (Postman CLI).
Now my question is, how can I achieve that?
I’m not super experienced in CI/CD or docker.
My approach was to try to run the app in the background with “path_to_executable &” and then execute the tests with “newman …”.
This “works” but the problem is that whatever I run in the next step after the one with “path_to_executable &” will just hang. So, I suppose that using background jobs is not the way to go…
On my local machine I can run the app in one terminal window and execute the tests in a different terminal window.
If I would have to do it in one window I could let the app run in background with an added “&” in the end. Then I wouldn’t lose shell access for executing the tests. So I thought this would be a viable startegy in this case.
I am not familar with Newman, can you share your workflow yml here? Which command do you use to run your app? Which operating system do you use? Windows, Linux or MacOs? What’s the error message you got?