Skip to content
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,37 @@ jobs:
- name: 'Run unit tests'
run: cargo test --locked --workspace --exclude basic_solana --exclude sol_rpc_int_tests --exclude sol_rpc_e2e_tests

icp-ninja-tests:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4

- name: 'Install dfx'
uses: dfinity/setup-dfx@e50c04f104ee4285ec010f10609483cf41e4d365
with:
dfx-version: "0.27.0"

- name: 'Confirm dfx successful installation'
run: dfx --version

- name: 'Use free Solana RPC provider'
working-directory: examples/basic_solana/ninja
run: |
sed -i 's|solana_network = opt variant { Devnet }|solana_network = opt variant { Custom = record { url = \\"https://api.devnet.solana.com\\"; headers = null } }|g' dfx.json

- name: "Deploy locally"
working-directory: examples/basic_solana/ninja
run: |
dfx start --clean --background
dfx deploy
out=$(dfx canister call basic_solana solana_account --output json)
echo "$out"
echo "$out" | grep -E "[1-9A-HJ-NP-Za-km-z]{32,44}" > /dev/null || { echo "❌ Call to 'solana_account' failed"; exit 1; }
out=$(dfx canister call basic_solana get_balance --output json)
echo "$out"
echo "$out" | grep -E "[0-9]+(?:_[0-9]+)*" > /dev/null || { echo "❌ Call to 'get_balance' failed"; exit 1; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there might be a problem with the grep since the job issues a warning

grep: warning: ? at start of expression

@lpahlavi lpahlavi Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good catch! Turns out this is PCRE regex syntax for a non-capturing group, but we need POSIX syntax which doesn't support that. I've removed it (both in the icp-ninja-tests and ent-to-end-tests steps) as it's unnecessary for us.


integration-tests:
needs: [ reproducible-build ]
runs-on: ubuntu-22.04
Expand Down