Skip to content
Merged
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
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unit:
name: unit
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: sdk/pyproject.toml

- name: Install dependencies
working-directory: ./sdk
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]

- name: Run unit tests
working-directory: ./sdk
run: pytest tests --ignore=tests/test_integration.py

integration:
name: integration
runs-on: ubuntu-latest
timeout-minutes: 20
env:
TRP_ENDPOINT: ${{ secrets.TRP_ENDPOINT }}
TEST_PARTY_A_ADDRESS: ${{ secrets.TEST_PARTY_A_ADDRESS }}
TEST_PARTY_A_MNEMONIC: ${{ secrets.TEST_PARTY_A_MNEMONIC }}
TEST_PARTY_B_ADDRESS: ${{ secrets.TEST_PARTY_B_ADDRESS }}
TEST_PARTY_B_MNEMONIC: ${{ secrets.TEST_PARTY_B_MNEMONIC }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: sdk/pyproject.toml

- name: Install dependencies
working-directory: ./sdk
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]

- name: Run integration tests
working-directory: ./sdk
run: pytest tests/test_integration.py
Loading