Are we talking about GitFlow or GitHubFlow (first comment of yours)?
Triggering time consuming tests on every commit to your feature branch would be overkill. For these tests, we usually have manual triggers, such as specifc commit commands, that provide an environment and deploy the app for testing. If all goes well, the code goes to preprod where tests are performed automatically and a release is created. A commit to prod then simply results in using the already built release.
But there are many different approaches, you should pick one that suits your requirements and your team.