I have an automation/DevOps task to do and I wanted to know if any of you actually thought/did something similar:
I want some postman collection with written tests to run after PR on GitHub was approved by developers in order to verify the API layer before it actually comes to the QA team to give some insight whether critical parts of the system were broken or not.
The main issue is this: there might be a scenario where we approve a few PR’s at the same time and both of them need to run at the same time with this API verification, but both PR’s was not yet merged so there are differences, for example, base URL is not the same (I know how to pass link from Jenkins to postman variable).
Question: If there were 2 PR’s approved at the same time or the second one was approved while the first collection is running - base URL is changed and first collection run might fail, how do I prevent this? Can I create a duplicate collection with a different name via GitHub actions, run it and delete it in the end in case of success?