diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0665591a..fb202943 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,11 +59,12 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Build run: pnpm run build - name: Build Docker images run: pnpm run docker:build + - name: Copy pusher secrets + run: cp pusher/secrets.example.env pusher/secrets.env - name: Start services # Start the e2e services in the background and wait a small amount of time for them to start. run: | diff --git a/.gitignore b/.gitignore index 32067655..095faab1 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,5 @@ signed-api.json # Do not ignore e2e config files. These don't need to be listed on Dockerignore because e2e package is not dockerized. !packages/e2e/**/pusher.json -!packages/e2e/**/secrets.env !packages/e2e/**/.env !packages/e2e/**/signed-api.json diff --git a/packages/e2e/README.md b/packages/e2e/README.md index 7353cf3b..edfd97fb 100644 --- a/packages/e2e/README.md +++ b/packages/e2e/README.md @@ -4,8 +4,9 @@ ## Getting started -1. If you are using Docker Desktop, you need to change the URL in `pusher/secrets.env` from `localhost` to - `host.docker.internal`, because pusher is running inside a Docker container. +1. Copy the pusher secrets. Run `cp pusher/secrets.example.env pusher/secrets.env`. If you are using Docker Desktop, you + need to change the URL in `pusher/secrets.env` from `localhost` to `host.docker.internal`, because pusher is running + inside a Docker container. 2. Build the latest Docker images. Run `pnpm run docker:build` from the monorepo root. The e2e flow uses the docker images. 3. This module contains services (or configurations) that are integrated together. Specifically: diff --git a/packages/e2e/src/pusher/pusher.json b/packages/e2e/src/pusher/pusher.json index e2926857..bd4e6bdd 100644 --- a/packages/e2e/src/pusher/pusher.json +++ b/packages/e2e/src/pusher/pusher.json @@ -59,7 +59,7 @@ "signedApis": [ { "name": "localhost", - "url": "http://${HOST_IP}:8090" + "url": "${SIGNED_API_URL}" } ], "ois": [ @@ -74,7 +74,7 @@ "paths": { "/": { "get": { "parameters": [] } } }, - "servers": [{ "url": "http://${HOST_IP}:9876" }], + "servers": [{ "url": "${DATA_PROVIDER_API}" }], "security": {} }, "endpoints": [ diff --git a/packages/e2e/src/pusher/secrets.env b/packages/e2e/src/pusher/secrets.env deleted file mode 100644 index 0896b397..00000000 --- a/packages/e2e/src/pusher/secrets.env +++ /dev/null @@ -1,4 +0,0 @@ -# Secrets must NOT be quoted. -# -# Use "host.docker.internal" if using Docker for Desktop. -HOST_IP=localhost diff --git a/packages/e2e/src/pusher/secrets.example.env b/packages/e2e/src/pusher/secrets.example.env new file mode 100644 index 00000000..a976f272 --- /dev/null +++ b/packages/e2e/src/pusher/secrets.example.env @@ -0,0 +1,5 @@ +# Secrets must NOT be quoted. +# +# Use "host.docker.internal" if using Docker for Desktop, otherwise laeve it set to "localhost". +SIGNED_API_URL=http://localhost:8090 +DATA_PROVIDER_API=http://localhost:9876