Skip to content

Commit

Permalink
test(katana): messaging e2e test (#1925)
Browse files Browse the repository at this point in the history
* -Runner creation
-L1 -> L2 Messaging

* L2 -> L1 messaging

* clippy and fmt

* style

* apply kari's cool formatting

* fmt

* Applying more change from Code review

* tests

* Delete debug from Sol! and not used B256

* Merge remote-tracking branch 'origin/main' into katana/Messaging-Intregation-Testing

* Cleaning cargo.lock

* Add new option to Katnna  Runner Config

* consume message and check msg fee

* clippy and fmt

* - Use alloy Anvil Binding Object to spawn an instance
- Delete Manual created Anvil Runner object
- Delete unnecesary libraries from Cargo.toml

* Add step to install anvil in Dockerfile

* Remove profile local from Anvil installation command

* Delete step to install anvil

* Point CI to devcontainer that has Anvil installed

* Update Alloy

* fix: fix test with pre-computed tx hash

* ci: increment cores for clippy

* ci: pre-build latest sozo to re-use in jobs

* ci: fix missing dependency

* ci: fix missing x permission

* ci: remove unused cached to save time

* restore lockfile

* revert l1 handler tx hash computation changes

* revert some changes

* revert test case

---------

Co-authored-by: Ammar Arif <evergreenkary@gmail.com>
Co-authored-by: glihm <dev@glihm.net>
  • Loading branch information
3 people authored Jun 25, 2024
1 parent f6d7212 commit e87118d
Show file tree
Hide file tree
Showing 14 changed files with 2,816 additions and 83 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: |
cargo build -r --bin katana
cargo build -r --bin sozo
mkdir -p bins
cp ./target/release/katana bins/
cp ./target/release/sozo bins/
- uses: actions/upload-artifact@v4
with:
name: katana-binary
name: dojo-bins
path: bins

test:
Expand All @@ -35,7 +37,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- uses: actions/download-artifact@v4
with:
name: katana-binary
name: dojo-bins
path: /tmp/bins
- run: |
chmod +x /tmp/bins/katana
Expand Down Expand Up @@ -83,7 +85,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: katana-binary
name: dojo-bins
- run: |
chmod +x ./katana
./katana &
Expand All @@ -107,22 +109,34 @@ jobs:
scarb --manifest-path crates/dojo-core/Scarb.toml fmt --check
dojo-core-test:
needs: build
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
steps:
- uses: actions/download-artifact@v4
with:
name: dojo-bins
path: /tmp/bins
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo run --bin sozo -- --manifest-path crates/dojo-core/Scarb.toml test
- run: |
chmod +x /tmp/bins/sozo
/tmp/bins/sozo --manifest-path crates/dojo-core/Scarb.toml test
dojo-spawn-and-move-example-test:
needs: build
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
steps:
- uses: actions/download-artifact@v4
with:
name: dojo-bins
path: /tmp/bins
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo run --bin sozo -- --manifest-path examples/spawn-and-move/Scarb.toml test
- run: |
chmod +x /tmp/bins/sozo
/tmp/bins/sozo --manifest-path examples/spawn-and-move/Scarb.toml test
dojo-world-bindings-check:
runs-on: ubuntu-latest
Expand All @@ -134,7 +148,7 @@ jobs:
- run: cargo run --bin dojo-world-abigen -- --check

clippy:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-4-cores
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
steps:
Expand Down Expand Up @@ -162,17 +176,17 @@ jobs:
scripts/docs.sh
test-hurl:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
- uses: actions/download-artifact@v4
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
name: dojo-bins
path: /tmp/bins
- uses: actions/checkout@v3
- run: |
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/3.0.0/hurl_3.0.0_amd64.deb
sudo apt update && sudo apt install ./hurl_3.0.0_amd64.deb
- run: |
cargo build --bin katana
nohup target/debug/katana --accounts 2 --disable-fee &
chmod +x /tmp/bins/katana
nohup /tmp/bins/katana --accounts 2 --disable-fee &
- run: hurl --test examples/rpc/**/*.hurl
Loading

0 comments on commit e87118d

Please sign in to comment.