Skip to content

Commit

Permalink
Add ethers.js tests (#536)
Browse files Browse the repository at this point in the history
* Add Ethers test file partial

* Add storage and log tests

* Finish ethers.js tests

* Add further test cases

* Add ethers.js tests to CI

* Fix typo in CI

* Fix naming in CI step
  • Loading branch information
okkothejawa authored May 22, 2024
1 parent d424b83 commit 38c8b07
Show file tree
Hide file tree
Showing 5 changed files with 1,345 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,43 @@ jobs:
exit 1
fi
ethers_js:
runs-on: ubicloud-standard-16
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: dcarbone/install-jq-action@v2
- name: Install cargo-risczero
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain
run: cargo risczero install --version v2024-04-22.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ github.job }}-${{ github.head_ref }}
path: ./target
- name: Build citrea
run: make build
- name: Install node dependencies
working-directory: ./bin/citrea/tests/evm/ethers.js_tests
run: npm install
- name: Run ethers_js tests
run: |
RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path bin/citrea/configs/mock/sequencer_rollup_config.toml --sequencer-config-path bin/citrea/configs/mock/sequencer_config.toml --genesis-paths bin/test-data/genesis/demo-tests/mock &
sleep 2
RUST_LOG=off ./target/debug/citrea --rollup-config-path bin/citrea/configs/mock/rollup_config.toml --genesis-paths bin/test-data/genesis/demo-tests/mock &
sleep 2
./bin/citrea/publish_da_block.sh &
cd ./bin/citrea/tests/evm/ethers.js_tests
npx mocha test.js
sys_tx_keccak:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
Expand Down
6 changes: 6 additions & 0 deletions bin/citrea/tests/evm/ethers.js_tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.env
coverage
coverage.json
typechain
typechain-types
Loading

0 comments on commit 38c8b07

Please sign in to comment.