-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: use openrpc-testgen tool for RPC testing #2799
base: main
Are you sure you want to change the base?
Changes from all commits
03ae67a
bf946f9
da023b4
57e11d7
6358bf0
9111e11
8e04de6
a698dd6
b94d358
7c09e49
5b0a03f
f687607
fd0abb7
3db23b0
f01b611
b8bf98b
cf5e3f4
d87d54a
4a422aa
a7b5bbf
01ec474
5a7fa34
a2331b0
a1f4992
97d82cf
5c1fe14
1b2e746
8f6b508
9c8bd3f
cb8e99e
2aa10f8
388cae8
0b75127
2b7cbb3
a3e445f
3fbd79a
fa961ab
81a6d25
8b35204
d33fa46
3774479
7070cbc
5b6e5bd
6a89226
c8e46cd
a841a8b
d8dda27
414de20
fb19b14
baf7d38
8f53825
762233d
cb743dc
3591079
59cccac
78fe5e1
3012d8b
2d69bf6
db136b5
071ca37
13f7f50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,7 +5,7 @@ on: | |||||
branches: | ||||||
- main | ||||||
pull_request: | ||||||
|
||||||
env: | ||||||
CARGO_TERM_COLOR: always | ||||||
RUST_VERSION: 1.80.0 | ||||||
|
@@ -27,6 +27,142 @@ jobs: | |||||
name: dojo-bins | ||||||
path: bins | ||||||
|
||||||
dojo-tests: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Wondering if this should be in the same file since we may not want to run this at every CI, only when |
||||||
needs: build | ||||||
runs-on: arc-runner-set | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From where this runner set is coming from? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is deployed on our visoft cluster. |
||||||
env: | ||||||
KATANA_ADDR: "127.0.0.1" | ||||||
KATANA_PORT: "5050" | ||||||
KATANA_NO_MINING_PORT: "5051" | ||||||
KATANA_NO_FEE_PORT: "5052" | ||||||
KATANA_NO_ACCOUNT_VALIDATION_PORT: "5053" | ||||||
KATANA_OPENRPC_PORT: "5054" | ||||||
PAYMASTER_PRIVATE_KEY: "0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912" | ||||||
PAYMASTER_ACCOUNT_ADDRESS: "0x127fd5f1fe78a71f8bcd1fec63e3fe2f0486b6ecd5c86a0466c3a21fa5cfcec" | ||||||
UDC_ADDRESS: "0x41a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf" | ||||||
ACCOUNT_CLASS_HASH: "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" | ||||||
SCARB_VERSION: "2.8.4" | ||||||
Uacias marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
|
||||||
- name: Install build dependencies | ||||||
run: | | ||||||
sudo apt-get update && \ | ||||||
sudo apt-get install -y build-essential libclang-dev git curl bash libssl-dev pkg-config | ||||||
|
||||||
- uses: actions-rs/toolchain@v1 | ||||||
with: | ||||||
toolchain: stable | ||||||
|
||||||
Uacias marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
- name: Install Scarb | ||||||
run: | | ||||||
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH" | ||||||
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | bash -s -- -v $SCARB_VERSION | ||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||||||
|
||||||
- name: Download katana binary | ||||||
uses: actions/download-artifact@v4 | ||||||
with: | ||||||
name: dojo-bins | ||||||
path: /tmp/bins | ||||||
|
||||||
- run: chmod +x /tmp/bins/katana | ||||||
|
||||||
- name: Start katana nodes | ||||||
run: | | ||||||
declare -A KATANA_CONFIG=( | ||||||
["${KATANA_PORT}"]="" | ||||||
["${KATANA_OPENRPC_PORT}"]="" | ||||||
["${KATANA_NO_MINING_PORT}"]="--no-mining --dev" | ||||||
["${KATANA_NO_FEE_PORT}"]="--dev --dev.no-fee" | ||||||
["${KATANA_NO_ACCOUNT_VALIDATION_PORT}"]="--dev --dev.no-account-validation" | ||||||
) | ||||||
|
||||||
for PORT in "${!KATANA_CONFIG[@]}"; do | ||||||
/tmp/bins/katana \ | ||||||
--http.port "${PORT}" \ | ||||||
--http.addr "${KATANA_ADDR}" \ | ||||||
--silent \ | ||||||
${KATANA_CONFIG[$PORT]} & | ||||||
done | ||||||
|
||||||
Uacias marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
- name: Checkout katana-runner repository | ||||||
uses: actions/checkout@v3 | ||||||
with: | ||||||
repository: neotheprogramist/starknet-rpc-tests | ||||||
path: katana-runner | ||||||
|
||||||
- name: Scarb build | ||||||
run: | | ||||||
scarb build | ||||||
working-directory: katana-runner | ||||||
|
||||||
- name: Build openrpc-testgen-runner | ||||||
run: | | ||||||
cargo build --release --features "openrpc katana katana_no_mining katana_no_fee katana_no_account_validation" -p openrpc-testgen -p openrpc-testgen-runner | ||||||
working-directory: katana-runner | ||||||
|
||||||
- name: Run Katana Suite | ||||||
run: | | ||||||
URLS="http://${KATANA_ADDR}:${KATANA_PORT}" | ||||||
target/release/openrpc-testgen-runner \ | ||||||
--urls "${URLS}" \ | ||||||
--paymaster-account-address "${PAYMASTER_ACCOUNT_ADDRESS}" \ | ||||||
--paymaster-private-key "${PAYMASTER_PRIVATE_KEY}" \ | ||||||
--udc-address "${UDC_ADDRESS}" \ | ||||||
--account-class-hash "${ACCOUNT_CLASS_HASH}" \ | ||||||
--suite katana | ||||||
working-directory: katana-runner | ||||||
|
||||||
- name: Run OpenRPC Suite | ||||||
run: | | ||||||
URLS="http://${KATANA_ADDR}:${KATANA_OPENRPC_PORT}" | ||||||
target/release/openrpc-testgen-runner \ | ||||||
--urls "${URLS}" \ | ||||||
--paymaster-account-address "${PAYMASTER_ACCOUNT_ADDRESS}" \ | ||||||
--paymaster-private-key "${PAYMASTER_PRIVATE_KEY}" \ | ||||||
--udc-address "${UDC_ADDRESS}" \ | ||||||
--account-class-hash "${ACCOUNT_CLASS_HASH}" \ | ||||||
--suite open-rpc | ||||||
working-directory: katana-runner | ||||||
|
||||||
- name: Run Katana No Mining Suite | ||||||
run: | | ||||||
URLS="http://${KATANA_ADDR}:${KATANA_NO_MINING_PORT}" | ||||||
target/release/openrpc-testgen-runner \ | ||||||
--urls "${URLS}" \ | ||||||
--paymaster-account-address "${PAYMASTER_ACCOUNT_ADDRESS}" \ | ||||||
--paymaster-private-key "${PAYMASTER_PRIVATE_KEY}" \ | ||||||
--udc-address "${UDC_ADDRESS}" \ | ||||||
--account-class-hash "${ACCOUNT_CLASS_HASH}" \ | ||||||
--suite katana-no-mining | ||||||
working-directory: katana-runner | ||||||
|
||||||
- name: Run Katana No Fee Suite | ||||||
run: | | ||||||
URLS="http://${KATANA_ADDR}:${KATANA_NO_FEE_PORT}" | ||||||
target/release/openrpc-testgen-runner \ | ||||||
--urls "${URLS}" \ | ||||||
--paymaster-account-address "${PAYMASTER_ACCOUNT_ADDRESS}" \ | ||||||
--paymaster-private-key "${PAYMASTER_PRIVATE_KEY}" \ | ||||||
--udc-address "${UDC_ADDRESS}" \ | ||||||
--account-class-hash "${ACCOUNT_CLASS_HASH}" \ | ||||||
--suite katana-no-fee | ||||||
working-directory: katana-runner | ||||||
|
||||||
- name: Run Katana No Account Validation Suite | ||||||
run: | | ||||||
URLS="http://${KATANA_ADDR}:${KATANA_NO_ACCOUNT_VALIDATION_PORT}" | ||||||
target/release/openrpc-testgen-runner \ | ||||||
--urls "${URLS}" \ | ||||||
--paymaster-account-address "${PAYMASTER_ACCOUNT_ADDRESS}" \ | ||||||
--paymaster-private-key "${PAYMASTER_PRIVATE_KEY}" \ | ||||||
--udc-address "${UDC_ADDRESS}" \ | ||||||
--account-class-hash "${ACCOUNT_CLASS_HASH}" \ | ||||||
--suite katana-no-account-validation | ||||||
working-directory: katana-runner | ||||||
|
||||||
|
||||||
test: | ||||||
needs: ensure-docker | ||||||
runs-on: ubuntu-latest-32-cores | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: release-dispatch | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.