Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad committed Mar 6, 2024
1 parent d49d84e commit 39f8266
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: E2E (debug)

on: [push, pull_request]
on:
-push:
-tags-ignore:
- '*'

concurrency:
group:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: E2E (docker)

on:
push:
pull_request:
branches: [master, dev]
-push:
-tags-ignore:
- '*'

concurrency:
group:
Expand All @@ -13,9 +13,6 @@ concurrency:

jobs:
e2e:
if:
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' ||
github.event_name == 'pull_request'
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -41,7 +38,7 @@ jobs:
- name: Run e2e tests (${{ matrix.resolution }} res)
run: |
docker-compose -f docker-compose.ci.yml --env-file ${{ matrix.resolution }}-res.env --profile synpress --profile foundry up --build --exit-code-from synpress
docker-compose -f docker-compose.ci.yml --env-file ${{ matrix.resolution }}-res.env --profile synpress--build --exit-code-from synpress
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
Expand Down
37 changes: 15 additions & 22 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ services:
depends_on:
- display
- video
- agd
entrypoint: []
working_dir: /app
volumes:
- ./docker/videos:/app/tests/e2e/videos
- ./docker/screenshots:/app/tests/e2e/screenshots
command: >
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 && nginx && pnpm test:e2e:ci:anvil'
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 && nginx && pnpm test:e2e:ci:keplr'
networks:
- x11

Expand Down Expand Up @@ -100,30 +101,22 @@ services:
networks:
- x11

foundry:
agd:
profiles:
- foundry
container_name: foundry
image: synthetixio/foundry:457bb48776c3b14de232d9dda620ba9188dc40ac-base
command: [ 'anvil --no-cors --fork-url ${ANVIL_FORK_URL}' ]
environment:
- ANVIL_IP_ADDR=0.0.0.0
- synpress
container_name: agoric_chain
image: frazarshad/offerup-test-chain:1.0.0
platform: linux/amd64
ports:
- '8545:8545'
networks:
- x11

foundry-metamask-test-dapp:
profiles:
- foundry
container_name: foundry-metamask-test-dapp
image: synthetixio/foundry:457bb48776c3b14de232d9dda620ba9188dc40ac-base
# Port and chain id as required by the MetaMask Test Dapp
command: [ 'anvil --no-cors --port 8546 --chain-id 1338' ]
- 26656:26656
- 26657:26657
- 1317:1317
environment:
- ANVIL_IP_ADDR=0.0.0.0
ports:
- '8546:8546'
DEST: 1
DEBUG: "SwingSet:ls,SwingSet:vat"
volumes:
- ./tools/contract:/workspace
entrypoint: /workspace/scripts/run-chain.sh
networks:
- x11

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"test:e2e:headless": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'pnpm synpress:run --headless'",
"test:e2e:headless:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run --headless'",
"test:e2e:ci": "start-server-and-test 'VITE_LOCAL_ENV=agoric_chain pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run --record --group'",
"test:e2e:ci:keplr": "start-server-and-test 'pnpm start:ui' http-get://localhost:3000 'pnpm start:json-server' http-get://localhost:3004 'pnpm synpress:run:keplr --record --group'",
"test:e2e:ci:anvil": "start-server-and-test 'turbo start:server' http-get://localhost:3000 'CYPRESS_USE_ANVIL=true pnpm synpress:run --record --group'",
"test:e2e:ci:cypress-action": "CYPRESS_USE_ANVIL=true pnpm synpress:run",
"synpress:run:keplr": "EXTENSION=keplr SKIP_EXTENSION_SETUP=true SYNPRESS_LOCAL_TEST=true node synpress.js run --configFile=synpress.config.js",
Expand Down

0 comments on commit 39f8266

Please sign in to comment.