Skip to content

Commit

Permalink
build: add bindings ts tests to ci
Browse files Browse the repository at this point in the history
Add tests from AhaLabs#11 which didn't make it into #973 due to the quickstart image not starting properly in CI.

Adding this directly to #973 was costing too much time. We can troubleshoot quickstart issues here.
  • Loading branch information
chadoh committed Nov 20, 2023
1 parent da85a14 commit 7c92809
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/bindings-ts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

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@sha256:9cc0901e9b138b228c7b292bd9b72945b72384b2b502a3d9cd37acb2750e441d
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:
- run: echo $CARGO_TARGET_DIR
- 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\"}'"
- run: curl --no-progress-meter "http://localhost:8000/friendbot?addr=$(./soroban config identity address)"
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- run: ./soroban config identity fund --network standalone
working-directory: cmd/crates/soroban-spec-typescript/ts-tests
- 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: curl "http://localhost:8000/friendbot?addr=$(./soroban config identity address)"
- run: npm ci && npm run test
working-directory: cmd/crates/soroban-spec-typescript/ts-tests

0 comments on commit 7c92809

Please sign in to comment.