diff --git a/.github/workflows/pr-realm-web.yml b/.github/workflows/pr-realm-web.yml index d55c3a3878..17cd08c3af 100644 --- a/.github/workflows/pr-realm-web.yml +++ b/.github/workflows/pr-realm-web.yml @@ -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" diff --git a/packages/realm-web-integration-tests/harness/github.ts b/packages/realm-web-integration-tests/harness/github.ts index b03455d3a3..d7ce2b7bd6 100644 --- a/packages/realm-web-integration-tests/harness/github.ts +++ b/packages/realm-web-integration-tests/harness/github.ts @@ -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"); @@ -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"] },