Skip to content

feat(xmtp_api_d14n): generalize XIP-83 bidi over a binding + d14n backend #6342

feat(xmtp_api_d14n): generalize XIP-83 bidi over a binding + d14n backend

feat(xmtp_api_d14n): generalize XIP-83 bidi over a binding + d14n backend #6342

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
workspace: ${{ steps.filter.outputs.workspace }}
node: ${{ steps.filter.outputs.node }}
wasm: ${{ steps.filter.outputs.wasm }}
node_sdk: ${{ steps.filter.outputs.node_sdk }}
browser_sdk: ${{ steps.filter.outputs.browser_sdk }}
ios: ${{ steps.filter.outputs.ios }}
android: ${{ steps.filter.outputs.android }}
bindings-check: ${{ steps.filter.outputs.bindings-check }}
devcontainer: ${{ steps.filter.outputs.devcontainer }}
xdbg: ${{ steps.filter.outputs.xdbg }}
keepalive-probe: ${{ steps.filter.outputs.keepalive-probe }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
workspace:
- 'crates/**'
- 'bindings/**'
- 'apps/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.cargo/**'
- 'rust-toolchain.toml'
- 'dev/docker/**'
- 'dev/up'
- 'flake.lock'
- '.github/workflows/test.yml'
- '.github/workflows/test-workspace*'
node:
- 'crates/**'
- 'bindings/node/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'nix/**'
- 'flake.lock'
- 'dev/docker/**'
- 'dev/up'
- '.github/workflows/test-node*'
wasm:
- 'crates/**'
- 'bindings/wasm/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'nix/**'
- 'flake.lock'
- 'dev/docker/**'
- '.github/workflows/test-wasm*'
node_sdk:
- 'sdks/js/node-sdk/**'
- 'sdks/js/package.json'
- 'sdks/js/yarn.lock'
- 'sdks/js/.yarnrc.yml'
- 'sdks/js/tsconfig.json'
- 'sdks/js/eslint.config.js'
- 'sdks/js/js.just'
- 'sdks/js/dev/**'
- 'bindings/node/**'
- 'crates/**'
- 'nix/**'
- 'flake.lock'
- 'dev/docker/**'
- '.github/workflows/test-node-sdk*'
browser_sdk:
- 'sdks/js/browser-sdk/**'
- 'sdks/js/package.json'
- 'sdks/js/yarn.lock'
- 'sdks/js/.yarnrc.yml'
- 'sdks/js/tsconfig.json'
- 'sdks/js/eslint.config.js'
- 'sdks/js/js.just'
- 'sdks/js/dev/**'
- 'bindings/wasm/**'
- 'crates/**'
- 'nix/**'
- 'flake.lock'
- 'dev/docker/**'
- '.github/workflows/test-browser-sdk*'
ios:
- 'sdks/ios/**'
- 'bindings/mobile/**'
- 'crates/**'
- 'nix/**'
- 'flake.lock'
- 'Package.swift'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/test-ios*'
android:
- 'sdks/android/**'
- 'bindings/mobile/**'
- 'crates/**'
- 'nix/**'
- 'flake.lock'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/test-android*'
bindings-check:
- 'bindings/mobile/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'dev/docker/**'
- 'dev/up'
- 'rust-toolchain.toml'
- '.cargo/**'
- 'flake.lock'
- '.github/workflows/test-bindings*'
devcontainer:
- '.devcontainer/**'
- '.github/workflows/test-devcontainer*'
xdbg:
- 'apps/xmtp_debug/**'
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.cargo/**'
- 'rust-toolchain.toml'
- 'nix/**'
- 'flake.lock'
- '.github/workflows/test.yml'
- '.github/workflows/test-xdbg.yml'
keepalive-probe:
- 'apps/keepalive-probe/**'
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.cargo/**'
- 'rust-toolchain.toml'
- 'nix/**'
- 'flake.lock'
- '.github/workflows/test.yml'
- '.github/workflows/test-keepalive-probe.yml'
test-workspace:
needs: detect-changes
if: needs.detect-changes.outputs.workspace == 'true'
uses: ./.github/workflows/test-workspace.yml
secrets: inherit
test-xdbg:
needs: detect-changes
if: needs.detect-changes.outputs.xdbg == 'true'
uses: ./.github/workflows/test-xdbg.yml
secrets: inherit
test-keepalive-probe:
needs: detect-changes
if: needs.detect-changes.outputs.keepalive-probe == 'true'
uses: ./.github/workflows/test-keepalive-probe.yml
secrets: inherit
test-node:
needs: detect-changes
if: needs.detect-changes.outputs.node == 'true'
uses: ./.github/workflows/test-node.yml
secrets: inherit
test-wasm:
needs: detect-changes
if: needs.detect-changes.outputs.wasm == 'true'
uses: ./.github/workflows/test-wasm.yml
secrets: inherit
# Gated on test-node: runs after the node-bindings test job so the
# node-bindings-test nix build is a cache hit. Proceeds when test-node
# succeeded OR was skipped (bindings unchanged); aborts only if it failed.
test-node-sdk:
needs: [detect-changes, test-node]
if: >-
!cancelled() && needs.test-node.result != 'failure'
&& needs.detect-changes.outputs.node_sdk == 'true'
uses: ./.github/workflows/test-node-sdk.yml
secrets: inherit
# Gated on test-wasm (wasm-bindings power browser-sdk). Same semantics as above.
test-browser-sdk:
needs: [detect-changes, test-wasm]
if: >-
!cancelled() && needs.test-wasm.result != 'failure'
&& needs.detect-changes.outputs.browser_sdk == 'true'
uses: ./.github/workflows/test-browser-sdk.yml
secrets: inherit
test-ios:
needs: detect-changes
if: |
needs.detect-changes.outputs.ios == 'true' &&
(
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
)
uses: ./.github/workflows/test-ios.yml
secrets: inherit
test-android:
needs: detect-changes
if: needs.detect-changes.outputs.android == 'true'
uses: ./.github/workflows/test-android.yml
secrets: inherit
test-bindings-check:
needs: detect-changes
if: needs.detect-changes.outputs.bindings-check == 'true'
uses: ./.github/workflows/test-bindings-check.yml
secrets: inherit
test-devcontainer:
needs: detect-changes
if: |
needs.detect-changes.outputs.devcontainer == 'true' &&
(
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
)
permissions:
contents: read
packages: write
pull-requests: write
uses: ./.github/workflows/test-devcontainer.yml
secrets: inherit
test:
name: Test
runs-on: ubuntu-latest
if: always()
needs:
- test-workspace
- test-xdbg
- test-keepalive-probe
- test-node
- test-wasm
- test-node-sdk
- test-browser-sdk
# - test-ios TODO:(nm) Temporarily making optional until we are confident the new workflows are fast/reliable enough to block CI
# - test-android TODO:(nm) Temporarily making optional until we are confident the new workflows are fast/reliable enough to block CI
- test-bindings-check
- test-devcontainer
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || \
"${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more test jobs failed or were cancelled"
exit 1
fi