Skip to content

Commit

Permalink
ci: adding implementation for running e2e tests in Github Actions runner
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Apr 5, 2024
1 parent e8b5f4a commit 3f1f44d
Show file tree
Hide file tree
Showing 12 changed files with 278 additions and 364 deletions.
63 changes: 0 additions & 63 deletions .github/workflows/e2e.yml

This file was deleted.

37 changes: 36 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

jobs:
unit:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand Down Expand Up @@ -60,3 +60,38 @@ jobs:
- name: verify contracts started onchain
run: |
curl http://localhost:1317/agoric/vstorage/data/published.agoricNames.instance | grep offerUp
- name: Install linux deps
run: |
sudo apt-get install --no-install-recommends -y \
fluxbox \
xvfb
- name: Run xvfb and fluxbox
run: |
Xvfb :0 -screen 0 1024x768x24 -listen tcp -ac &
fluxbox &
env:
DISPLAY: :0.0

- name: Run e2e tests
uses: cypress-io/github-action@248bde77443c376edc45906ede03a1aba9da0462
with:
start: npx serve ui/dist -p 5173
command: yarn test:e2e
wait-on: 'http://localhost:5173'
wait-on-timeout: 120
browser: chrome
env:
DISPLAY: :0.0
SECRET_WORDS: "orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology"

- name: Archive e2e artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-artifacts
path: |
ui/test/e2e/videos
ui/test/e2e/screenshots
continue-on-error: true
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"docker:make": "docker compose exec agd make -C /workspace/contract",
"make:help": "make list",
"start": "yarn docker:make clean start-contract",
"send-funds": "docker compose exec agd bash /workspace/contract/scripts/send-funds.sh",
"build": "agoric run scripts/build-contract-deployer.js",
"test": "ava --verbose",
"lint": "eslint '**/*.js'",
Expand Down
28 changes: 0 additions & 28 deletions contract/scripts/run-chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,6 @@ approveProposals() {
done
}

sendFunds() {
echo "Sending Funds....."
src=agoric1t83za2h5zc5anmkxvfag82qafshr538mvzmnmx
dest=agoric1p2aqakv3ulz4qfy2nut86j9gx0dx0yw09h96md
amt=55535300uist

echo "Sending ISTs"
agd tx bank send $src $dest $amt --keyring-backend=test --chain-id=agoriclocal \
--gas=auto --gas-adjustment=1.2 --yes -b block
echo "ISTs sent successfully"

amt=331000ubld
echo "Sending BLDs"
agd tx bank send $src $dest $amt --keyring-backend=test --chain-id=agoriclocal \
--gas=auto --gas-adjustment=1.2 --yes -b block
echo "BLDs sent successfully"

amt=9ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA
echo "Sending ATOMs"
agd tx bank send $src $dest $amt --keyring-backend=test --chain-id=agoriclocal \
--gas=auto --gas-adjustment=1.2 --yes -b block
echo "ATOMs sent successfully"

}

# Start the chain in the background
/usr/src/upgrade-test-scripts/start_agd.sh &

Expand All @@ -88,11 +63,8 @@ waitForBlock 2
# Approve any proposals forever in the background.
approveProposals &

sendFunds

make -C /workspace/contract mint100
make -C /workspace/contract lower-bundle-cost
make -C /workspace/contract clean start-contract

# bring back chain process to foreground
wait
6 changes: 0 additions & 6 deletions contract/scripts/send-funds.sh

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-testing-library": "^6.2.0",
"eslint-plugin-ui-testing": "^2.0.1",
"start-server-and-test": "^2.0.3"
}
"serve": "^14.2.1"
},
"dependencies": {}
}
1 change: 0 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"build": "tsc && vite build",
"test": "vitest spec",
"test:e2e": "EXTENSION=keplr synpress run --configFile=test/e2e/synpress.config.cjs",
"test:e2e:ci": "start-server-and-test 'yarn dev' http-get://localhost:5173 'yarn test:e2e'",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "yarn lint --fix",
"preview": "vite preview"
Expand Down
100 changes: 0 additions & 100 deletions ui/test/e2e/docker-compose.yml

This file was deleted.

39 changes: 0 additions & 39 deletions ui/test/e2e/nginx.conf

This file was deleted.

Loading

0 comments on commit 3f1f44d

Please sign in to comment.