What is the best way to archive the E2E tests
sangdth
HOBBYOP

2 years ago

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.

Solved

6 Replies

sangdth
HOBBYOP

2 years ago

042474d3-ce79-497f-8bd1-5498b05eb20b


brody
EMPLOYEE

2 years 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


sangdth
HOBBYOP

2 years ago

thanks, Brody, this is sad 😦


pcreations
HOBBY

2 years 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


pcreations
HOBBY

2 years ago

In fact the deployment_status trigger is event better 🙂


brody
EMPLOYEE

a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...