From 39f8266e7f3738d497f76f0adc0a688843527bc0 Mon Sep 17 00:00:00 2001 From: Fraz Arshad Date: Wed, 6 Mar 2024 12:44:23 +0500 Subject: [PATCH] test --- .../workflows/{ => disabled}/e2e_debug.yml | 5 ++- .../workflows/{disabled => }/e2e_docker.yml | 11 ++---- docker-compose.ci.yml | 37 ++++++++----------- package.json | 1 + 4 files changed, 24 insertions(+), 30 deletions(-) rename .github/workflows/{ => disabled}/e2e_debug.yml (98%) rename .github/workflows/{disabled => }/e2e_docker.yml (89%) diff --git a/.github/workflows/e2e_debug.yml b/.github/workflows/disabled/e2e_debug.yml similarity index 98% rename from .github/workflows/e2e_debug.yml rename to .github/workflows/disabled/e2e_debug.yml index 5d0ac623b..2607effdd 100644 --- a/.github/workflows/e2e_debug.yml +++ b/.github/workflows/disabled/e2e_debug.yml @@ -1,6 +1,9 @@ name: E2E (debug) -on: [push, pull_request] +on: + -push: + -tags-ignore: + - '*' concurrency: group: diff --git a/.github/workflows/disabled/e2e_docker.yml b/.github/workflows/e2e_docker.yml similarity index 89% rename from .github/workflows/disabled/e2e_docker.yml rename to .github/workflows/e2e_docker.yml index b40b583d0..1eae602a8 100644 --- a/.github/workflows/disabled/e2e_docker.yml +++ b/.github/workflows/e2e_docker.yml @@ -1,9 +1,9 @@ name: E2E (docker) on: - push: - pull_request: - branches: [master, dev] + -push: + -tags-ignore: + - '*' concurrency: group: @@ -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: @@ -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 diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index ff54fcd6d..601adda92 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -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 @@ -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 diff --git a/package.json b/package.json index 886a46ea2..5f6813d6c 100644 --- a/package.json +++ b/package.json @@ -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",