Skip to content

Commit

Permalink
ci: prefer ipv4 resolution for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Jun 13, 2024
1 parent 55bdf51 commit dca7c5a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
docker-compose -f tests/e2e/docker-compose.yml --profile $SYNPRESS_PROFILE up --build --exit-code-from synpress
env:
# conditionals based on github event
SYNPRESS_PROFILE: ${{ 'true' == 'true' && 'daily-tests' || 'synpress' }}
CYPRESS_AGORIC_NET: ${{ 'true' == 'true' && 'emerynet' || 'local' }}
SYNPRESS_PROFILE: ${{ env.IS_EMERYNET_TEST == 'true' && 'daily-tests' || 'synpress' }}
CYPRESS_AGORIC_NET: ${{ env.IS_EMERYNET_TEST == 'true' && 'emerynet' || 'local' }}
# for docker-compose.yml
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# syntax=docker/dockerfile:1
FROM --platform=linux/amd64 synthetixio/docker-e2e:18.16-ubuntu as base

# Prefer IPv4 for DNS resolution
ENV NODE_OPTIONS=--dns-result-order=ipv4first

RUN mkdir /app
WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest",
"coverage": "vitest run --coverage",
"test:e2e": "EXTENSION=keplr SKIP_EXTENSION_SETUP=true synpress run --configFile=tests/e2e/synpress.config.cjs",
"test:e2e:ci": "yarn dev & sleep 10 && yarn test:e2e"
"test:e2e:ci": "start-server-and-test 'yarn dev' http-get://localhost:5173 'yarn test:e2e'"
},
"dependencies": {
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
- ./docker/videos:/app/tests/e2e/videos
- ./docker/screenshots:/app/tests/e2e/screenshots
command: >
bash -c 'pnpm wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && if [ "$CYPRESS_AGORIC_NET" == "local" ]; then nginx; fi && yarn test:e2e:ci'
bash -c 'echo -n "======> local noVNC URL: http://localhost:8080/vnc.html?autoconnect=true " && pnpm wait-on http://display:8080 && echo -n "======> remote noVNC URL: " && curl -s ngrok:4040/api/tunnels | jq -r .tunnels[0].public_url && if [ "$CYPRESS_AGORIC_NET" == "local" ]; then nginx; fi && yarn test:e2e:ci'
networks:
- x11

Expand Down Expand Up @@ -104,7 +104,7 @@ services:
profiles:
- synpress
container_name: agoric_chain
image: ghcr.io/agoric/agoric-3-proposals:latest
image: ghcr.io/agoric/agoric-3-proposals:main
logging:
driver: none
platform: linux/amd64
Expand Down

0 comments on commit dca7c5a

Please sign in to comment.