From 4adab59381f61bc04c5ff0b24f1415315dcc20c9 Mon Sep 17 00:00:00 2001 From: anson Date: Thu, 9 Oct 2025 23:26:01 +0100 Subject: [PATCH 1/4] fix(release.yml): update ref to use head_branch instead of head_sha --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0a56bf17..b4bfae112 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 From d3ff8e7b715cdb3b8f5e03f2436906453145fc98 Mon Sep 17 00:00:00 2001 From: anson Date: Thu, 9 Oct 2025 23:33:35 +0100 Subject: [PATCH 2/4] feat(workflows): add naga health workflows --- .github/workflows/naga-health-check.yml | 114 ++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .github/workflows/naga-health-check.yml diff --git a/.github/workflows/naga-health-check.yml b/.github/workflows/naga-health-check.yml new file mode 100644 index 000000000..429e54740 --- /dev/null +++ b/.github/workflows/naga-health-check.yml @@ -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/wasm-pack-action@v0.4.0 + 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 pnpm@9.15.0 --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" + From 0fa94cb56cc63a29608cb6246cac243e079adf28 Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 10 Oct 2025 00:19:55 +0100 Subject: [PATCH 3/4] chore(workflows): remove naga health check workflow --- .github/workflows/naga-health-check.yml | 114 ------------------------ 1 file changed, 114 deletions(-) delete mode 100644 .github/workflows/naga-health-check.yml diff --git a/.github/workflows/naga-health-check.yml b/.github/workflows/naga-health-check.yml deleted file mode 100644 index 429e54740..000000000 --- a/.github/workflows/naga-health-check.yml +++ /dev/null @@ -1,114 +0,0 @@ -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/wasm-pack-action@v0.4.0 - 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 pnpm@9.15.0 --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" - From 902c1062c4b7641bbabe61be3b46c6e017416755 Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 10 Oct 2025 00:20:31 +0100 Subject: [PATCH 4/4] feat(workflows): add Naga health check workflow with scheduled and manual triggers --- .github/workflows/naga-health-check.yml | 114 ++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .github/workflows/naga-health-check.yml diff --git a/.github/workflows/naga-health-check.yml b/.github/workflows/naga-health-check.yml new file mode 100644 index 000000000..7c4138cbb --- /dev/null +++ b/.github/workflows/naga-health-check.yml @@ -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/wasm-pack-action@v0.4.0 + 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 pnpm@9.15.0 --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