Railwayβ€’3mo ago
Sang Dang

What is the best way to archive the E2E tests

Hi, after many months, I still can not figure out how to run E2E tests against PR environment build. My requirement is quite simple: Create PR => trigger the PR environment build, if is OK => trigger the E2E test. If I turn on the auto PR envrionment feature from Railway, I have no way to trigger the GitHub actions after the build completed because Railway never expose a way to do it. (I already spent days to confirm this and not sure if it still true until this time.) If I manually create PR environment from github actions, and do I understand correctly, it is impossible through using railway CLI, and the only way is using GraphQL query? And please give me constructive support and don't troll me. Thank you.
5 Replies
Percyβ€’3mo ago
Project ID: 042474d3-ce79-497f-8bd1-5498b05eb20b
Sang Dang
Sang Dangβ€’3mo ago
Brodyβ€’3mo ago
railway doesn't provide any mechanisms to know when a pr deployment has succeeded besides the comment the bot makes on your pr, at this time that's a feature you would have to implement yourself with the public api
Sang Dang
Sang Dangβ€’3mo ago
thanks, Brody, this is sad 😦
Pierreβ€’2mo ago
hello @Sang Dang ! You can definitely do that by using the "deployment" trigger on Github Action, you'll just have to create a condition on the "if" property of your e2e job to run the job only if github.event.deployment.production_environment is false In fact the deployment_status trigger is event better πŸ™‚