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
5 changes: 5 additions & 0 deletions .changeset/rude-radios-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lit-protocol/e2e': patch
---

Add standalone Naga health checks (EOA + single PKP) covering handshake, pkpSign, signSessionKey, executeJs, and encrypt/decrypt, with status logging via @lit-protocol/lit-status-sdk (no breaking changes).
114 changes: 114 additions & 0 deletions .github/workflows/naga-health-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Naga Health Checks

on:
push:
branches:
- feature/jss-29-feature-add-naga-uptime-bot
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
inputs:
naga_branch:
description: 'Branch to run health checks from (optional)'
required: true
default: 'naga'
network:
description: 'Specific network to test (leave empty for all)'
required: false
type: choice
options:
- naga-dev
- naga-test

env:
LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }}
LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }}

jobs:
naga-health-check:
runs-on: ubuntu-latest
environment: Health Check
strategy:
fail-fast: false
matrix:
network: [naga-dev, naga-test]
env:
NETWORK: ${{ matrix.network }}
LIVE_MASTER_ACCOUNT: ${{ matrix.network == 'naga-dev' && secrets.LIVE_MASTER_ACCOUNT_NAGA_DEV || secrets.LIVE_MASTER_ACCOUNT_NAGA_TEST }}
LIT_YELLOWSTONE_PRIVATE_RPC_URL: ${{ vars.LIT_YELLOWSTONE_PRIVATE_RPC_URL }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || github.ref }}
fetch-depth: 1

- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rust-std

- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.18.0'
registry-url: 'https://registry.npmjs.org'

- name: Enable corepack and setup pnpm
run: |
corepack enable
corepack prepare [email protected] --activate

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build project
run: pnpm build

- name: Verify required environment variables
run: |
echo "Checking environment variables for ${{ matrix.network }}..."
if [ -z "${LIVE_MASTER_ACCOUNT}" ]; then
echo "❌ LIVE_MASTER_ACCOUNT is not set for ${{ matrix.network }}"
exit 1
fi
if [ -z "${LIT_STATUS_WRITE_KEY}" ]; then
echo "❌ LIT_STATUS_WRITE_KEY is not set"
exit 1
fi
if [ -z "${LIT_STATUS_BACKEND_URL}" ]; then
echo "❌ LIT_STATUS_BACKEND_URL is not set"
exit 1
fi
echo "✅ All required environment variables are set"

- name: Run health check for ${{ matrix.network }}
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.network == '' || github.event.inputs.network == matrix.network }}
run: pnpm run ci:health
timeout-minutes: 10
env:
NETWORK: ${{ matrix.network }}
LIVE_MASTER_ACCOUNT: ${{ matrix.network == 'naga-dev' && secrets.LIVE_MASTER_ACCOUNT_NAGA_DEV || secrets.LIVE_MASTER_ACCOUNT_NAGA_TEST }}
LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }}
LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }}
LIT_YELLOWSTONE_PRIVATE_RPC_URL: ${{ vars.LIT_YELLOWSTONE_PRIVATE_RPC_URL }}
LOG_LEVEL: info

- name: Health check summary
if: always()
run: |
if [[ "${{ job.status }}" == "success" ]]; then
echo "✅ Health check passed for ${{ matrix.network }}"
echo "Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
else
echo "❌ Health check failed for ${{ matrix.network }}"
echo "Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
echo "Please check the logs above for details"
fi
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_sha }}
ref: ${{ github.event.workflow_run.head_branch }}

- name: Setup PNPM
uses: pnpm/action-setup@v4
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
branch: naga
branch: ${{ github.event.workflow_run.head_branch || 'naga' }}
version: pnpm changeset version
publish: pnpm changeset publish --access public
commit: 'chore(release): version packages'
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
"format:check": "npx nx format:check --all",
"test:e2e": "npx jest --clearCache --config ./jest.e2e.config.ts && LOG_LEVEL=${LOG_LEVEL:-silent} dotenvx run --env-file=.env -- jest --runInBand --detectOpenHandles --forceExit --config ./jest.e2e.config.ts --testTimeout=50000000 -t",
"test:custom": "npx jest --clearCache --config ./jest.e2e.config.ts && LOG_LEVEL=${LOG_LEVEL:-silent} dotenvx run --env-file=.env -- jest --runInBand --detectOpenHandles --forceExit --config ./jest.e2e.config.ts --testTimeout=50000000",
"test:e2e:ci": "npx jest --clearCache --config ./jest.e2e.config.ts && LOG_LEVEL=${LOG_LEVEL:-silent} npx jest --runInBand --detectOpenHandles --forceExit --config ./jest.e2e.config.ts --testTimeout=50000000 --runTestsByPath"
"test:e2e:ci": "npx jest --clearCache --config ./jest.e2e.config.ts && LOG_LEVEL=${LOG_LEVEL:-silent} npx jest --runInBand --detectOpenHandles --forceExit --config ./jest.e2e.config.ts --testTimeout=50000000 --runTestsByPath",
"test:health": "LOG_LEVEL=${LOG_LEVEL:-silent} dotenvx run --env-file=.env -- tsx packages/e2e/src/health/index.ts",
"ci:health": "LOG_LEVEL=${LOG_LEVEL:-silent} tsx packages/e2e/src/health/index.ts"
},
"private": true,
"dependencies": {
"@babel/core": "^7.28.4",
"@babel/preset-env": "^7.28.3",
"@babel/preset-typescript": "^7.27.1",
"@dotenvx/dotenvx": "^1.6.4",
"@lit-protocol/lit-status-sdk": "^0.1.8",
"@lit-protocol/nacl": "7.1.1",
"@lit-protocol/uint8arrays": "7.1.1",
"@metamask/eth-sig-util": "5.0.2",
Expand Down
Loading
Loading