Skip to content

Commit

Permalink
Running Realm Web workflow with the latest server
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Jan 26, 2022
1 parent 932247e commit 00f6c07
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
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

0 comments on commit 00f6c07

Please sign in to comment.