From 363ed81db68fe1cfeacb3e87cbff768f410f3963 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Tue, 21 May 2024 13:38:15 -0400 Subject: [PATCH] fix: use newest cli's and nextest --- .cargo/config.toml | 6 +++--- .github/workflows/standalone.yml | 18 +++++++++++------- justfile | 9 ++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 70964f8..a5bcf01 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,9 +2,9 @@ [alias] # command aliases bwl = "build --profile release-with-logs" -install_soroban = "binstall -y --install-path ./target/bin soroban-cli --version 20.0.0-rc.4.1" -install_soroban_dev = "install --git https://github.com/stellar/soroban-tools --rev v20.2.0 --debug --root ./target soroban-cli" -install_loam = "install --version 0.6.5 --debug --root ./target loam-cli" +install_soroban = "binstall -y --install-path ./target/bin soroban-cli --version 21.0.0-preview.1" +# install_soroban_dev = "install --git https://github.com/stellar/soroban-tools --rev v20.2.0 --debug --root ./target soroban-cli" +install_loam = "install --git https://github.com/loambuild/loam-sdk --rev 7eb6541d67160ac7bad3eeee5f72b8c94f4101de --debug --root ./target loam-cli" # c = "check" # t = "test" r = "run --quiet" diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index 8d016d6..8b96cbb 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -1,6 +1,5 @@ -name: local - +name: Tests on: push: branches: [main, release/**] @@ -8,11 +7,15 @@ on: jobs: test: - name: Test CLI + name: test RPC runs-on: ubuntu-22.04 + env: + SOROBAN_RPC_URL: http://localhost:8000/soroban/rpc + SOROBAN_NETWORK_PASSPHRASE: "Standalone Network ; February 2017" + SOROBAN_ACCOUNT: default services: rpc: - image: stellar/quickstart:testing + image: stellar/quickstart:v423-testing ports: - 8000:8000 env: @@ -26,7 +29,6 @@ jobs: --health-retries 50 steps: - uses: actions/checkout@v3 - - run: "curl --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}'" - uses: actions/cache@v3 with: path: | @@ -36,11 +38,13 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: taiki-e/install-action@just - - uses: taiki-e/install-action@cargo-binstall - run: rustup update - run: rustup target add wasm32-unknown-unknown + - uses: taiki-e/install-action@just + - uses: taiki-e/install-action@nextest + - uses: cargo-bins/cargo-binstall@main - run: just setup + - run: cargo nextest run - run: just clean - run: just publish_all - run: just deployed_contracts \ No newline at end of file diff --git a/justfile b/justfile index 9597a16..4fee164 100644 --- a/justfile +++ b/justfile @@ -59,12 +59,12 @@ build +args='': [private] setup_default: - -soroban config identity generate default --config-dir $CONFIG_DIR + -soroban config identity generate default @setup: - echo {{ if path_exists(soroban) == "true" { "" } else { `cargo install_soroban_dev` } }} - echo {{ if path_exists(loam) == "true" { "" } else { `cargo install_loam` } }} - echo {{ if path_exists(env_var('CONFIG_DIR') / '.soroban/identity/default.toml') == "true" { "" } else { `just setup_default` } }} + cargo binstall -y --install-path ./target/bin soroban-cli --version 21.0.0-preview.1 + cargo install --git https://github.com/loambuild/loam-sdk --rev 7eb6541d67160ac7bad3eeee5f72b8c94f4101de --debug --root ./target loam-cli + just setup_default @fund_default: @@ -90,7 +90,6 @@ setup_default: publish_all: fund_default deploy_self #!/usr/bin/env bash set -e; - echo $SOROBAN_NETWORK; just install_self; for name in $(loam build --ls) do