-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: force withdrawal and chopsticks tests in container
missing case
- Loading branch information
Showing
16 changed files
with
324 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.git | ||
.github | ||
.gitignore | ||
.idea | ||
|
||
chopsticks | ||
docs | ||
target | ||
tests | ||
|
||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/cancel-workflow-action@0.12.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v4.1.2 | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/toolchain@v1.0.7 | ||
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/rust-cache@v2.7.3 | ||
|
||
- name: cargo nextest | ||
run: cargo nextest run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
FROM ubuntu:latest | ||
RUN mkdir /app | ||
COPY target/release/kalatori /app/kalatori | ||
FROM rust:1.82 as builder | ||
|
||
ENV KALATORI_HOST="0.0.0.0:16726" | ||
ENV KALATORI_RPC="wss://rpc.ibp.network/polkadot" | ||
WORKDIR /usr/src/kalatori | ||
|
||
COPY Cargo.toml Cargo.lock ./ | ||
|
||
RUN mkdir -p src && echo "fn main() {}" > src/main.rs | ||
|
||
RUN cargo build --release | ||
|
||
RUN rm -rf src | ||
COPY . . | ||
|
||
RUN cargo build --release | ||
|
||
FROM ubuntu:latest | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /usr/src/kalatori/target/release/kalatori /app/kalatori | ||
|
||
EXPOSE 16726 | ||
|
||
CMD ["./kalatori"] | ||
ENV KALATORI_HOST="0.0.0.0:16726" | ||
ENV KALATORI_SEED="bottom drive obey lake curtain smoke basket hold race lonely fit walk" | ||
ENV KALATORI_RECIPIENT="5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" | ||
ENV KALATORI_REMARK="test" | ||
|
||
CMD ["/app/kalatori"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
account-lifetime = 86400000 # 1 day. | ||
depth = 3600000 # 1 hour. | ||
debug = true | ||
|
||
[[chain]] | ||
name = "polkadot" | ||
native-token = "DOT" | ||
decimals = 10 | ||
endpoints = [ | ||
"ws://chopsticks-polkadot:8000", | ||
] | ||
|
||
[[chain]] | ||
name = "statemint" | ||
endpoints = [ | ||
"ws://chopsticks-statemint:9000", | ||
] | ||
|
||
[[chain.asset]] | ||
name = "USDC" | ||
id = 1337 | ||
|
||
[[chain.asset]] | ||
name = "USDt" | ||
id = 1984 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.