I have a pretty straightforward pipeline to do the following:
Checkout branch → run jest tests → package → deploy to AWS lambda staging → manual approval → deploy to AWS lambda production
My question is about best practices or other usecases that would fit this scenario regarding the following:
The package I deploy to lambda should be production only, without the devDependencies, but I need to run the tests before.
What is the best approach? Save into the workspace the node_modules fully, and to generate the package I do a prune before zipping the package file?
Could someone share some references or examples that would fit this better?