Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/main-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
project-path: 'sdk/ts'
project-name: 'TS SDK'
forge-build: true

test-sdk-compat:
name: Test (TS SDK Compat)
Expand All @@ -31,6 +32,99 @@ jobs:
project-name: 'TS SDK Compat'
bootstrap-project-path: 'sdk/ts'

test-protocol-drift-static:
name: Test (Protocol Drift Static)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.5.1

- name: Build contract artifacts
run: forge build
working-directory: contracts

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: sdk/ts/package.json
cache: npm
cache-dependency-path: |
sdk/ts/package-lock.json
sdk/ts-compat/package-lock.json

- name: Install TS SDK dependencies
run: npm ci
working-directory: sdk/ts

- name: Build TS SDK for compat file dependency
run: npm run build:ci
working-directory: sdk/ts

- name: Install TS SDK Compat dependencies
run: npm ci
working-directory: sdk/ts-compat

- name: Run static protocol drift checks
run: ./scripts/check-protocol-drift.sh --static

test-protocol-drift-runtime:
name: Test (Protocol Drift Runtime)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: sdk/ts/package.json
cache: npm
cache-dependency-path: |
sdk/ts/package-lock.json
sdk/ts-compat/package-lock.json

- name: Install TS SDK dependencies
run: npm ci
working-directory: sdk/ts

- name: Build TS SDK for compat file dependency
run: npm run build:ci
working-directory: sdk/ts

- name: Install TS SDK Compat dependencies
run: npm ci
working-directory: sdk/ts-compat

- name: Run runtime protocol drift smoke
run: ./scripts/check-protocol-drift.sh --runtime
env:
NITRONODE_RUNTIME_SMOKE_LOG_DIR: runtime-smoke-logs

- name: Upload runtime smoke logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: protocol-drift-runtime-smoke-logs
path: runtime-smoke-logs
if-no-files-found: ignore

build-and-publish-nitronode:
name: Build and Publish (Nitronode)
needs: test-nitronode
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
project-path: 'sdk/ts'
project-name: 'TS SDK'
forge-build: true

test-sdk-compat:
name: Test (TS SDK Compat)
Expand All @@ -31,6 +32,99 @@ jobs:
project-name: 'TS SDK Compat'
bootstrap-project-path: 'sdk/ts'

test-protocol-drift-static:
name: Test (Protocol Drift Static)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.5.1

- name: Build contract artifacts
run: forge build
working-directory: contracts

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: sdk/ts/package.json
cache: npm
cache-dependency-path: |
sdk/ts/package-lock.json
sdk/ts-compat/package-lock.json

- name: Install TS SDK dependencies
run: npm ci
working-directory: sdk/ts

- name: Build TS SDK for compat file dependency
run: npm run build:ci
working-directory: sdk/ts

- name: Install TS SDK Compat dependencies
run: npm ci
working-directory: sdk/ts-compat

- name: Run static protocol drift checks
run: ./scripts/check-protocol-drift.sh --static

test-protocol-drift-runtime:
name: Test (Protocol Drift Runtime)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: sdk/ts/package.json
cache: npm
cache-dependency-path: |
sdk/ts/package-lock.json
sdk/ts-compat/package-lock.json

- name: Install TS SDK dependencies
run: npm ci
working-directory: sdk/ts

- name: Build TS SDK for compat file dependency
run: npm run build:ci
working-directory: sdk/ts

- name: Install TS SDK Compat dependencies
run: npm ci
working-directory: sdk/ts-compat

- name: Run runtime protocol drift smoke
run: ./scripts/check-protocol-drift.sh --runtime
env:
NITRONODE_RUNTIME_SMOKE_LOG_DIR: runtime-smoke-logs

- name: Upload runtime smoke logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: protocol-drift-runtime-smoke-logs
path: runtime-smoke-logs
if-no-files-found: ignore

# build-and-publish-sdk:
# needs: [test-sdk-ts, test-sdk-compat]
# name: Build and Publish (SDK)
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/protocol-drift-external-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Protocol Drift External Smoke

on:
workflow_dispatch:
inputs:
nitronode_ws_url:
description: Existing Nitronode WebSocket URL to smoke test, for example wss://...
required: true

permissions:
contents: read

jobs:
protocol-drift-external-smoke:
name: Protocol Drift External Smoke
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: sdk/ts/package.json
cache: npm
cache-dependency-path: |
sdk/ts/package-lock.json
sdk/ts-compat/package-lock.json

- name: Install TS SDK dependencies
run: npm ci
working-directory: sdk/ts

- name: Build TS SDK for compat file dependency
run: npm run build:ci
working-directory: sdk/ts

- name: Install TS SDK Compat dependencies
run: npm ci
working-directory: sdk/ts-compat

- name: Run external Nitronode compatibility smoke
run: ./scripts/check-protocol-drift.sh --runtime
env:
NITRONODE_RUNTIME_SMOKE_EXTERNAL: '1'
NITRONODE_RUNTIME_SMOKE_WS_URL: ${{ inputs.nitronode_ws_url }}
NITRONODE_RUNTIME_SMOKE_PRIVATE_KEY: ${{ secrets.NITRONODE_RUNTIME_SMOKE_PRIVATE_KEY }}
NITRONODE_RUNTIME_SMOKE_LOG_DIR: runtime-smoke-logs

- name: Upload external smoke logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: protocol-drift-external-smoke-logs
path: runtime-smoke-logs
if-no-files-found: ignore
18 changes: 18 additions & 0 deletions .github/workflows/test-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
required: false
type: string
default: ''
forge-build:
description: 'Build Foundry artifacts before validating this SDK project'
required: false
type: boolean
default: false

jobs:
test:
Expand All @@ -25,6 +30,19 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v6
with:
submodules: ${{ inputs.forge-build && 'recursive' || 'false' }}

- name: Install Foundry
if: ${{ inputs.forge-build }}
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.5.1

- name: Build contract artifacts
if: ${{ inputs.forge-build }}
run: forge build
working-directory: contracts

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
Loading
Loading