-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adds testing Railway deployment to CI #3157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/test-deploy.yaml
Outdated
server_hostname: ${{ steps.save_hostnames.outputs.server_hostname }} | ||
client_hostname: ${{ steps.save_hostnames.outputs.client_hostname }} | ||
|
||
railway_smoke_test_app: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's still a draft, just FYI.
My idea here was to use the same smoke test job with a matrix for all providers (only Railway and Fly at the time). It's the same test, the only thing that changes are the inputs.
I'm not 100% sure that's possible but just a heads up to try it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep yep, I'll optimize once I get it to work 😄
We still have the blocker of not being able to clean up Railway apps after they are created using the CLI.
@sodic ready for another look, I've split it up into multiple jobs now |
- name: Save deployment info to cache | ||
run: | | ||
set -e | ||
mkdir -p "$DEPLOY_INFO_DIR" | ||
echo "$SERVER_HOSTNAME" > "$DEPLOY_INFO_DIR/server-hostname" | ||
echo "$CLIENT_HOSTNAME" > "$DEPLOY_INFO_DIR/client-hostname" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I save the client and the server hostnames used in the smoke_test_app
job. I save this file in this job and then later on restore it in the smoke_test_app
job.
I ended up doing this because if I used job outputs, I'd have to have extra steps that map e.g. fly_server_hostname
into SERVER_HOSTNAME
(for Fly) and railway_server_hostname
into SERVER_HOSTNAME
(for Railway) in the smoke_test_app
job. We'd need to add a new mapping step for each new provider we added, so this is was a nice way to avoid it. Just save it into a file that the next job reads from.
Saving it into a file means that we just save it here and the smoke_test_app
doesn't need extra steps to load it since it's always saved into $DEPLOY_INFO_DIR
.
Deploying wasp-docs-on-main with
|
Latest commit: |
53c40a7
|
Status: | ✅ Deploy successful! |
Preview URL: | https://535ebd3c.wasp-docs-on-main.pages.dev |
Branch Preview URL: | https://miho-railway-deployment-test.wasp-docs-on-main.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for testing Railway deployment to the CI pipeline alongside the existing Fly.io deployment testing. The changes enable the CI to deploy and test applications on both platforms to ensure deployment compatibility.
Key changes:
- Added Railway deployment support to the CI workflow with matrix strategy for both Fly and Railway providers
- Introduced a new smoke testing script to verify deployed applications work correctly
- Implemented proper cleanup procedures for Railway deployments using GraphQL API calls
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
scripts/smoke-test-deployed-test-app.sh | New bash script for smoke testing deployed applications with retry logic and health checks |
.github/workflows/test-deploy.yaml | Extended CI workflow to support both Fly and Railway deployments using matrix strategy |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The smoke test on Railway is still failing even after 5 mins - I have to investigate if we can do anything. |
Closes #2994