Skip to content
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

Running Realm Web workflow with the latest server #4267

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/pr-realm-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,6 @@ jobs:
run: npm run test:github
working-directory: packages/realm-web-integration-tests
env:
MONGODB_REALM_TEST_SERVER: "2020-11-04" # TODO: Try using 'latest' once it's fixed
AWS_ACCESS_KEY_ID: ${{ secrets.BAAS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BAAS_AWS_SECRET_ACCESS_KEY }}
MONGODB_REALM_TEST_SERVER: "latest"
13 changes: 12 additions & 1 deletion packages/realm-web-integration-tests/harness/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import cp from "child_process";
import { run } from "./index";

const IMAGE_TAG = process.env.MONGODB_REALM_TEST_SERVER || "latest";
const { AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY } = process.env;

if (!AWS_ACCESS_KEY_ID || !AWS_SECRET_ACCESS_KEY) {
console.error("Missing either AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY");
process.exit(1);
}

async function startServer() {
console.log("Starting MongoDB Realm server");
Expand All @@ -30,7 +36,12 @@ async function startServer() {
"--rm",
"--name",
"mongodb-realm-test-server",
"--publish=9090:9090",
"--publish",
"9090:9090",
"--env",
`AWS_ACCESS_KEY_ID`,
"--env",
`AWS_SECRET_ACCESS_KEY`,
`ghcr.io/realm/ci/mongodb-realm-test-server:${IMAGE_TAG}`,
],
{ stdio: ["ignore", "pipe", "inherit"] },
Expand Down