-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/troubleshooting-emulator-tests
- Loading branch information
Showing
12 changed files
with
142 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: bindings typescript | ||
|
||
on: | ||
push: | ||
branches: [main, release/**] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: test generated libraries | ||
runs-on: ubuntu-22.04 | ||
services: | ||
rpc: | ||
image: stellar/quickstart:testing | ||
ports: | ||
- 8000:8000 | ||
env: | ||
ENABLE_LOGS: true | ||
NETWORK: local | ||
ENABLE_SOROBAN_RPC: true | ||
options: >- | ||
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 50 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- run: rustup update | ||
- run: cargo build | ||
- run: rustup target add wasm32-unknown-unknown | ||
- run: make build-test-wasms | ||
- run: npm ci && npm run test | ||
working-directory: cmd/crates/soroban-spec-typescript/ts-tests |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 12 additions & 12 deletions
24
cmd/crates/soroban-spec-typescript/ts-tests/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
import { spawnSync } from "node:child_process"; | ||
import { Address, Keypair } from "@stellar/stellar-sdk"; | ||
import { basicNodeSigner } from "@stellar/stellar-sdk/ContractClient"; | ||
import { basicNodeSigner } from "@stellar/stellar-sdk/contract"; | ||
|
||
const rootKeypair = Keypair.fromSecret(spawnSync("./soroban", ["keys", "show", "root"], { shell: true, encoding: "utf8" }).stdout.trim()); | ||
const rootKeypair = Keypair.fromSecret( | ||
spawnSync("./soroban", ["keys", "show", "root"], { | ||
shell: true, | ||
encoding: "utf8", | ||
}).stdout.trim(), | ||
); | ||
|
||
export const root = { | ||
keypair: rootKeypair, | ||
address: Address.fromString(rootKeypair.publicKey()), | ||
} | ||
}; | ||
|
||
export const rpcUrl = process.env.SOROBAN_RPC_URL ?? "http://localhost:8000/"; | ||
export const networkPassphrase = process.env.SOROBAN_NETWORK_PASSPHRASE ?? "Standalone Network ; February 2017"; | ||
export const networkPassphrase = | ||
process.env.SOROBAN_NETWORK_PASSPHRASE ?? | ||
"Standalone Network ; February 2017"; | ||
|
||
export const signer = basicNodeSigner(root.keypair, networkPassphrase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
mod bindings; | ||
mod custom_types; | ||
mod dotenv; | ||
mod fund; | ||
mod hello_world; | ||
mod tx; | ||
mod util; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use soroban_test::TestEnv; | ||
|
||
#[tokio::test] | ||
#[allow(clippy::too_many_lines)] | ||
async fn fund() { | ||
let sandbox = &TestEnv::new(); | ||
sandbox | ||
.new_assert_cmd("keys") | ||
.arg("generate") | ||
.arg("test") | ||
.assert() | ||
.success(); | ||
sandbox | ||
.new_assert_cmd("keys") | ||
.arg("fund") | ||
.arg("test") | ||
.assert() | ||
.stderr(predicates::str::contains("funding failed")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters