Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Tests
name: Python Tests Across

on:
pull_request:
Expand Down Expand Up @@ -46,5 +46,4 @@ jobs:

- name: Run tests with pytest
run: |
python -m pytest tests/** -vvv -s --tb=short --maxfail=1
continue-on-error: true
python -m pytest tests/across/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/ccip-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests CCIP

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/ccip/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/cctp-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests CCTP

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/cctp/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/debridge-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests deBridge

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/debridge/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/mayan-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests Mayan

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/mayan/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/omnibridge-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests Omnibridge

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/omnibridge/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/polygon-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests Polygon

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/polygon/** -vvv -s --tb=short --maxfail=1
49 changes: 49 additions & 0 deletions .github/workflows/ronin-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Tests Ronin

on:
pull_request:
branches:
- main
paths:
- "**.py"
- "tests/**"

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U testuser"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
python -m pytest tests/ronin/** -vvv -s --tb=short --maxfail=1
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,16 @@
"python": "${workspaceFolder}/.xchaindata/bin/python",
"env": { "PYTHONPATH": "${workspaceFolder}", "DATABASE_URL": "postgresql://admin:pwd@localhost/mayan" }
},
{
"name": "[Mayan Swift] generate cross-chain transactions",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/__init__.py",
"args": ["generate", "--bridge", "mayan"],
"console": "integratedTerminal",
"justMyCode": true,
"python": "${workspaceFolder}/.xchaindata/bin/python",
"env": { "PYTHONPATH": "${workspaceFolder}", "DATABASE_URL": "postgresql://admin:pwd@localhost/mayan" }
},
]
}
4 changes: 4 additions & 0 deletions cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def extract_evm_data(idx, bridge, blockchain, start_block, end_block, blockchain
)
)
extractor = EvmExtractor(bridge, blockchain, blockchains)

if idx == len(blockchains) - 1:
extractor.post_processing()

except Exception as e:
log_to_cli(
build_log_message_2(
Expand Down
Loading
Loading