Skip to content

Commit

Permalink
Merge pull request Alzymologist#110 from Vovke/force-withdrawal
Browse files Browse the repository at this point in the history
feat: order force withdrawal
  • Loading branch information
Slesarew authored Nov 8, 2024
2 parents cbf18e0 + 5d1ab46 commit 07178a6
Show file tree
Hide file tree
Showing 21 changed files with 471 additions and 623 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.github
.gitignore
.idea

chopsticks
docs
target
tests

Dockerfile
44 changes: 44 additions & 0 deletions .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Rust test

on:
pull_request:
push:
branches:
- main
- stable

jobs:
check:
name: Cargo test
runs-on: ubuntu-latest
steps:

- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/[email protected]
with:
fetch-depth: 50
submodules: 'recursive'

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: 0.9

- name: Rust Cache
uses: Swatinem/[email protected]

- name: cargo nextest
run: cargo nextest run
66 changes: 21 additions & 45 deletions .github/workflows/kalatori-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Kalatori Tests
name: Kalatori Test

on:
pull_request:
Expand Down Expand Up @@ -30,52 +30,28 @@ jobs:
- name: Verify directory structure
run: ls -R

- name: Install Rust stable toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: stable
override: true

- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: 0.9

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Run Rust app in background with environment variables
- name: Install Docker using Docker's official script
run: |
export KALATORI_HOST="127.0.0.1:16726"
export KALATORI_SEED="bottom drive obey lake curtain smoke basket hold race lonely fit walk"
export KALATORI_RECIPIENT="5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
export KALATORI_REMARK="test"
cargo build
nohup cargo r &
- name: Wait for Rust app to start
run: sleep 120
# Wait for the Rust app to start and then wait for the app to connect to RPC
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install Yarn package manager
run: npm install --global yarn
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
- name: Install dependencies
working-directory: ./tests/kalatori-api-test-suite
run: yarn install --network-timeout 100000
- name: Build and Start Containers
working-directory: ./tests
run: |
docker-compose up -d --build chopsticks-polkadot chopsticks-statemint kalatori-rust-app
- name: Run tests
working-directory: ./tests/kalatori-api-test-suite
env:
DAEMON_HOST: 'http://127.0.0.1:16726'
run: yarn test
- name: Wait for Dependencies to Initialize
run: sleep 60

# - name: Run Rust tests
# run: cargo nextest run
- name: Run Tests and Capture Exit Code
working-directory: ./tests
run: |
docker-compose run tests || exit_code=$?
docker-compose down
exit ${exit_code:-0}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file.

## [0.2.6] - 2024-11-01

### 🚀 Features

- Force withdrawal call implementation
- Docker container for the app
- Containerized test environment

### 🐛 Bug Fixes

- Fixed the storage fetching.
- Removed redundant name checks & thereby fixed the connection to Asset Hub chains.

## [0.2.5] - 2024-10-29

### 🚀 Features
Expand Down
Loading

0 comments on commit 07178a6

Please sign in to comment.