Skip to content

Commit

Permalink
Add e2e testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mj52951 committed Dec 16, 2024
1 parent 8600e12 commit b4dd9d4
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DB_NAME=squid
DB_PASS=squid
DB_PORT=5432
DB_USERNAME=postgres
DB_HOST=localhost

SHARED_CONFIG_URL="https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte"
29 changes: 29 additions & 0 deletions .github/workflows/e2e_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: E2E Tests

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Run Docker
run: docker compose up --build -d
- name: Wait
run: sleep 120s
- name: Run tests
run: yarn run test:e2e
- name: Clean up Docker containers
if: always()
run: docker compose down
4 changes: 1 addition & 3 deletions .env.example → envs/.env.api
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ DB_NAME=squid
DB_PASS=squid
DB_PORT=5432
DB_USERNAME=postgres
DB_HOST=localhost

SHARED_CONFIG_URL=
DB_HOST=db
2 changes: 1 addition & 1 deletion envs/.env.evm-1.example → envs/.env.evm-1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ START_SCRIPT_ENV=index

PROCESSOR_PROMETHEUS_PORT=3000

SHARED_CONFIG_URL=
SHARED_CONFIG_URL="https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte"

DOMAIN_ID=1
RPC_URL=[{"id": 1, "endpoint": "http://evm1:8545"},{"id": 2, "endpoint": "http://evm2:8545"}, {"id": 3, "endpoint": "ws://substrate-pallet:9944"}]
2 changes: 1 addition & 1 deletion envs/.env.evm-2.example → envs/.env.evm-2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ START_SCRIPT_ENV=index

PROCESSOR_PROMETHEUS_PORT=3002

SHARED_CONFIG_URL=
SHARED_CONFIG_URL="https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte"

DOMAIN_ID=2
RPC_URL=[{"id": 1, "endpoint": "http://evm1:8545"},{"id": 2, "endpoint": "http://evm2:8545"}, {"id": 3, "endpoint": "ws://substrate-pallet:9944"}]
5 changes: 4 additions & 1 deletion envs/.env.init.example → envs/.env.init
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ DB_USERNAME=postgres
DB_HOST=db
START_SCRIPT_ENV=init

SHARED_CONFIG_URL=
SHARED_CONFIG_URL="https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte"

RPC_URL=[{}]
DOMAIN_ID=0
2 changes: 1 addition & 1 deletion envs/.env.substrate.example → envs/.env.substrate
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ START_SCRIPT_ENV=index

PROCESSOR_PROMETHEUS_PORT=3004

SHARED_CONFIG_URL=
SHARED_CONFIG_URL="https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte"

DOMAIN_ID=3
RPC_URL=[{"id": 1, "endpoint": "http://evm1:8545"},{"id": 2, "endpoint": "http://evm2:8545"}, {"id": 3, "endpoint": "ws://substrate-pallet:9944"}]

0 comments on commit b4dd9d4

Please sign in to comment.