Skip to content

Commit

Permalink
CI: Add starknetjs compatibilty tests (keep-starknet-strange#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
petscheit authored Oct 26, 2023
1 parent f8ecc44 commit 281a12f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
uses: ./.github/workflows/starknet-rpc-tests.yml
needs: madara_commands

starknet-js-tests:
name: Run starknet-js compatibility tests
uses: ./.github/workflows/starknet-js-tests.yml
needs: madara_commands

# https://github.com/keep-starknet-strange/madara/issues/1097
# benchmark:
# name: Run benchmarks
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
uses: ./.github/workflows/starknet-rpc-tests.yml
needs: madara_commands

starknet-js-tests:
name: Run starknet-js compatibility tests
uses: ./.github/workflows/starknet-js-tests.yml
needs: madara_commands

# https://github.com/keep-starknet-strange/madara/issues/1097
# benchmark:
# name: Run benchmarks
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/starknet-js-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Starknet-js Compatibility Tests

on:
workflow_dispatch:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
env:
BINARY_PATH: ../target/release/madara
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: target/release/madara
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Setup dev chain
run: |
./target/release/madara setup --chain=dev --from-remote
- name: Run starknet-js test
run: |-
./target/release/madara --dev --execution native &
NATIVE_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
git clone https://github.com/keep-starknet-strange/sequencer-js-compatibility-tests.git
cd sequencer-js-compatibility-tests
npm install
npm test
kill $NATIVE_RUN_PID
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
method being used)
- refactor(sealing): how the sealing mode is passed into runtime
- feat(sealing): finalization for instant sealing
- test(starknet-js-test): run basic starknetjs compatibility tests again the
madara node
- feat(cache-option): add an option to enable aggressive caching in command-line
parameters

Expand Down

0 comments on commit 281a12f

Please sign in to comment.