diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21a8cbf4b..d3c6ec7f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -194,7 +194,7 @@ jobs: env: DOCKER_AWS_ENV: -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_DEFAULT_REGION CONFIG_PATH: ${{ needs.build.outputs.config_path }} - BASEMAPS_HOST: http://localhost:5001 + BASEMAPS_HOST: http://localhost:5000 steps: - uses: actions/checkout@v4 @@ -207,14 +207,17 @@ jobs: - name: (Smoke) Start Local Server run: | - ./scripts/bmc.sh ./index.cjs serve --config ${CONFIG_PATH} --port 5001 & + ./scripts/bmc.sh ./index.cjs serve --config ${CONFIG_PATH} & # Wait for the server to start - timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5001/v1/version)" != "200" ]]; do sleep 0.5; done' || false + timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/v1/version)" != "200" ]]; do sleep 0.5; done' || false - name: (Smoke) Run Smoke test run: ./scripts/bmc.sh --test ./node_modules/@basemaps/smoke/build/ + - name: (Smoke) Stop Server + run: docker stop bmc + screenshot: permissions: id-token: write @@ -253,6 +256,9 @@ jobs: save-only: true snapshot-path: .artifacts/visual-snapshots + - name: (Screenshot) Stop Server + run: docker stop bmc + visual-diff: permissions: id-token: write diff --git a/scripts/bmc.sh b/scripts/bmc.sh index 3cebcfdc2..b8540ac16 100755 --- a/scripts/bmc.sh +++ b/scripts/bmc.sh @@ -3,6 +3,7 @@ # Run the basemaps/cli as a docker container with all the extra environment vars and args passed in docker run \ --entrypoint node \ + --name bmc \ -v ${PWD}:${PWD} \ -p 5000:5000 \ -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_DEFAULT_REGION -e BASEMAPS_HOST \