Skip to content

Commit

Permalink
Add EVM Tests (#170)
Browse files Browse the repository at this point in the history
* Enable testing of evm event subscription

* Add foundry to CI

* Format code

* Move to start

* Add bash script to build test fixture contracts

* Use the base script to run tests

* Add solc install to GA

* Remove whitespace

* Add information on prerequisites

* Test event content

* Fix display bug
  • Loading branch information
ryardley authored Nov 5, 2024
1 parent cd2c68a commit 90d33f9
Show file tree
Hide file tree
Showing 19 changed files with 522 additions and 189 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ jobs:
with:
toolchain: 1.81.0
override: true


# We must install foundry in order to be able to test anvil
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install solc
run: |
sudo add-apt-repository ppa:ethereum/ethereum \
&& sudo apt-get update -y \
&& sudo apt-get install -y solc
# We need to setup node in order to compile the hardhat contracts to get the artifacts
- name: "Setup node"
uses: actions/setup-node@v2
Expand All @@ -41,6 +51,4 @@ jobs:
run: cd ./packages/ciphernode && cargo fmt -- --check

- name: Run tests
run: |
cd ./packages/ciphernode/
cargo test
run: "yarn ciphernode:test"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ciphernode:lint": "cd packages/ciphernode && cargo fmt -- --check",
"ciphernode:add": "cd packages/evm && yarn ciphernode:add",
"ciphernode:remove": "cd packages/evm && yarn ciphernode:remove",
"ciphernode:test": "cd packages/ciphernode && cargo test",
"ciphernode:test": "cd packages/ciphernode && ./scripts/test.sh",
"ciphernode:build": "cd packages/ciphernode && cargo build --release",
"preciphernode:build": "yarn evm:compile",
"committee:new": "cd packages/evm && yarn committee:new",
Expand Down
Loading

0 comments on commit 90d33f9

Please sign in to comment.