Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 11:01
v0.6.0
c801667

Added

  • WebSocket support — six new built-in actions, free and open source like
    every std/* transport. Two styles:

    A one-shot session (std/ws@v1) connects, exchanges messages, and
    closes in one step — timed as a single latency sample:

    steps:
      - uses: std/ws@v1
        with:
          url: wss://stream.example.com/feed
          messages:
            - send: '{"op":"subscribe","channel":"trades","id":"sub-${seq}"}'
              until_json: { type: trade }
        check:
          message_matches: { type: trade }

    A live connection (std/ws-connect@v1 + ws-send / ws-recv /
    ws-ping / ws-close) stays open across steps within an iteration, so WS
    traffic interleaves with HTTP steps:

    steps:
      - uses: std/ws-connect@v1
        with: { url: "wss://stream.example.com/feed" }
        outputs: feed
      - uses: std/ws-send@v1
        with:
          id: "${{ feed.id }}"
          send: '{"op":"order","id":"ord-${seq}","px":${randf(1.05,1.15,5)}}'
          repeat: 100
          interval_ms: 50
      - uses: std/ws-recv@v1
        with: { id: "${{ feed.id }}", until_json: { type: fill } }
      - uses: std/ws-close@v1
        with: { id: "${{ feed.id }}" }

    Text and binary (base64) frames, subprotocols (graphql-ws, STOMP, …),
    wss:// with skipTLSVerify for staging, and connection profiles via
    connection: ${{ config.x }}. See examples/websocket.test.yaml and
    docs/core/actions.md.

  • Dynamic message generator in the open engine: text payloads expand
    single-brace tokens per send — ${seq}, ${uuid}, ${now} / ${now_ms} /
    ${now_iso}, ${rand(a,b)}, ${randf(a,b,dp)}, ${choice(x|y|z)} — and
    repeat + interval_ms emit a stream of unique messages from one template.

  • Message asserts in std/check@v1: message_contains,
    message_matches (JSON-subset), and messages_count_gte work over the
    messages list any protocol action exposes (WebSocket and FIX alike), with
    at-least-one-matches semantics; on: got.messages.0 addresses a single
    message by position.

  • Custom histogram metrics: an action reporting an array of millisecond
    samples under its metrics key gets a full percentile summary line
    (avg/p(50)/p(90)/p(95)/p(99)/min/max count=N). The engine uses it for
    ws_msg_rtt — time from a send to the first reply matching your
    until-condition. Handshakes and one-shot sessions feed http_req_duration;
    waiting on server pushes deliberately does not.

Full Changelog: v0.5.0...v0.6.0