Merge pull request #1669 from selfxyz/release/staging-2026-01-29

chore: fix circuits tests in staging
This commit is contained in:
Justin Hernandez
2026-01-28 22:10:55 -08:00
committed by GitHub
69 changed files with 2623 additions and 869 deletions

View File

@@ -0,0 +1,47 @@
name: Cache Core SDK Build
description: Cache core SDK build artifacts (common, sdk/core)
inputs:
mode:
description: "save or restore"
required: true
cache-version:
description: Cache version string
required: false
default: v1
fail-on-cache-miss:
description: Fail if cache not found (restore mode only)
required: false
default: "false"
outputs:
cache-hit:
description: Whether cache was hit
value: ${{ steps.restore.outputs.cache-hit }}
runs:
using: composite
steps:
- id: restore
if: inputs.mode == 'restore'
uses: actions/cache/restore@v4
with:
path: |
common/dist
sdk/core/dist
node_modules
sdk/core/node_modules
common/node_modules
key: core-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
- id: save
if: inputs.mode == 'save'
uses: actions/cache/save@v4
with:
path: |
common/dist
sdk/core/dist
node_modules
sdk/core/node_modules
common/node_modules
key: core-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}

View File

@@ -0,0 +1,47 @@
name: Cache Mobile SDK Build
description: Cache mobile SDK build artifacts (common, mobile-sdk-alpha)
inputs:
mode:
description: "save or restore"
required: true
cache-version:
description: Cache version string
required: false
default: v1
fail-on-cache-miss:
description: Fail if cache not found (restore mode only)
required: false
default: "false"
outputs:
cache-hit:
description: Whether cache was hit
value: ${{ steps.restore.outputs.cache-hit }}
runs:
using: composite
steps:
- id: restore
if: inputs.mode == 'restore'
uses: actions/cache/restore@v4
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ inputs.cache-version }}-${{ github.sha }}
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
- id: save
if: inputs.mode == 'save'
uses: actions/cache/save@v4
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ inputs.cache-version }}-${{ github.sha }}

View File

@@ -0,0 +1,43 @@
name: Cache SDK Build
description: Cache SDK build artifacts (common, sdk-common, qrcode)
inputs:
mode:
description: "save or restore"
required: true
cache-version:
description: Cache version string
required: false
default: v1
fail-on-cache-miss:
description: Fail if cache not found (restore mode only)
required: false
default: "false"
outputs:
cache-hit:
description: Whether cache was hit
value: ${{ steps.restore.outputs.cache-hit }}
runs:
using: composite
steps:
- id: restore
if: inputs.mode == 'restore'
uses: actions/cache/restore@v4
with:
path: |
common/dist
sdk/sdk-common/dist
sdk/qrcode/dist
key: qrcode-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
- id: save
if: inputs.mode == 'save'
uses: actions/cache/save@v4
with:
path: |
common/dist
sdk/sdk-common/dist
sdk/qrcode/dist
key: qrcode-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}

View File

@@ -33,6 +33,7 @@ concurrency:
jobs:
build:
runs-on: ["128ram"]
timeout-minutes: 720 # 12 hours
permissions:
contents: read
actions: read

View File

@@ -56,15 +56,10 @@ jobs:
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/core build
- name: Cache build artifacts
uses: actions/cache/save@v4
uses: ./.github/actions/cache-core-sdk-build
with:
path: |
common/dist
sdk/core/dist
node_modules
sdk/core/node_modules
common/node_modules
key: core-sdk-build-${{ github.sha }}
mode: save
cache-version: v1
lint:
runs-on: ubuntu-latest
@@ -80,19 +75,19 @@ jobs:
corepack prepare yarn@4.12.0 --activate
- name: Restore build artifacts
id: build-cache
uses: actions/cache/restore@v4
uses: ./.github/actions/cache-core-sdk-build
with:
path: |
common/dist
sdk/core/dist
node_modules
sdk/core/node_modules
common/node_modules
key: core-sdk-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Install Dependencies
if: steps.build-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Build dependencies (fallback on cache miss)
if: steps.build-cache.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/core build
- name: Run linter
run: yarn workspace @selfxyz/core lint
@@ -110,19 +105,19 @@ jobs:
corepack prepare yarn@4.12.0 --activate
- name: Restore build artifacts
id: build-cache
uses: actions/cache/restore@v4
uses: ./.github/actions/cache-core-sdk-build
with:
path: |
common/dist
sdk/core/dist
node_modules
sdk/core/node_modules
common/node_modules
key: core-sdk-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Install Dependencies
if: steps.build-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Build dependencies (fallback on cache miss)
if: steps.build-cache.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/core build
- name: Type checking
run: yarn workspace @selfxyz/core types
@@ -140,18 +135,18 @@ jobs:
corepack prepare yarn@4.12.0 --activate
- name: Restore build artifacts
id: build-cache
uses: actions/cache/restore@v4
uses: ./.github/actions/cache-core-sdk-build
with:
path: |
common/dist
sdk/core/dist
node_modules
sdk/core/node_modules
common/node_modules
key: core-sdk-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Install Dependencies
if: steps.build-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Build dependencies (fallback on cache miss)
if: steps.build-cache.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/core build
- name: Run tests
run: yarn workspace @selfxyz/core test

View File

@@ -21,15 +21,10 @@ jobs:
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/mobile-sdk-alpha build
- name: Cache build artifacts
uses: actions/cache/save@v4
uses: ./.github/actions/cache-mobile-sdk-build
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ github.sha }}
mode: save
cache-version: v1
lint:
runs-on: ubuntu-latest
@@ -39,16 +34,17 @@ jobs:
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-mobile-sdk-build
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/mobile-sdk-alpha build
- name: Run linter
run: yarn workspace @selfxyz/mobile-sdk-alpha lint
@@ -60,16 +56,17 @@ jobs:
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-mobile-sdk-build
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/mobile-sdk-alpha build
- name: Check Prettier formatting
run: yarn workspace @selfxyz/mobile-sdk-alpha prettier --check .
@@ -81,16 +78,17 @@ jobs:
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-mobile-sdk-build
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/mobile-sdk-alpha build
- name: Type checking
run: yarn workspace @selfxyz/mobile-sdk-alpha types
@@ -102,15 +100,16 @@ jobs:
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-mobile-sdk-build
with:
path: |
common/dist
packages/mobile-sdk-alpha/dist
node_modules
packages/mobile-sdk-alpha/node_modules
common/node_modules
key: mobile-sdk-alpha-build-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: v1
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/mobile-sdk-alpha build
- name: Run tests
run: yarn workspace @selfxyz/mobile-sdk-alpha test

View File

@@ -80,16 +80,14 @@ jobs:
- name: Cache Yarn dependencies
id: yarn-cache
uses: actions/cache@v4
uses: ./.github/actions/cache-yarn
with:
path: |
.yarn/cache
node_modules
sdk/qrcode/node_modules
common/node_modules
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
- name: Install Dependencies
uses: ./.github/actions/yarn-install
@@ -102,13 +100,10 @@ jobs:
yarn workspace @selfxyz/qrcode build
- name: Cache build artifacts
uses: actions/cache/save@v4
uses: ./.github/actions/cache-sdk-build
with:
path: |
common/dist
sdk/sdk-common/dist
sdk/qrcode/dist
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
mode: save
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
# Quality checks job
quality-checks:
@@ -141,29 +136,32 @@ jobs:
- name: Cache Yarn dependencies
id: yarn-cache
uses: actions/cache@v4
uses: ./.github/actions/cache-yarn
with:
path: |
.yarn/cache
node_modules
sdk/qrcode/node_modules
common/node_modules
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-sdk-build
with:
path: |
common/dist
sdk/sdk-common/dist
sdk/qrcode/dist
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/sdk-common build
yarn workspace @selfxyz/qrcode build
- name: Run linter
run: yarn workspace @selfxyz/qrcode lint:imports:check
@@ -210,29 +208,32 @@ jobs:
- name: Cache Yarn dependencies
id: yarn-cache
uses: actions/cache@v4
uses: ./.github/actions/cache-yarn
with:
path: |
.yarn/cache
node_modules
sdk/qrcode/node_modules
common/node_modules
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-sdk-build
with:
path: |
common/dist
sdk/sdk-common/dist
sdk/qrcode/dist
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/sdk-common build
yarn workspace @selfxyz/qrcode build
- name: Verify build artifacts
run: |
@@ -273,29 +274,41 @@ jobs:
- name: Cache Yarn dependencies
id: yarn-cache
uses: actions/cache@v4
uses: ./.github/actions/cache-yarn
with:
path: |
.yarn/cache
node_modules
sdk/qrcode/node_modules
common/node_modules
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Restore build artifacts
uses: actions/cache/restore@v4
id: restore-build
uses: ./.github/actions/cache-sdk-build
with:
path: |
common/dist
sdk/sdk-common/dist
sdk/qrcode/dist
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
fail-on-cache-miss: true
mode: restore
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
fail-on-cache-miss: false
- name: Build dependencies (fallback on cache miss)
if: steps.restore-build.outputs.cache-hit != 'true'
run: |
yarn workspace @selfxyz/common build
yarn workspace @selfxyz/sdk-common build
yarn workspace @selfxyz/qrcode build
- name: Check for nested require() in tests
run: |
# Check SDK tests for nested require patterns that cause OOM
if grep -rE "require\(['\"]react(-native)?['\"])" sdk/qrcode/src/ sdk/qrcode/tests/ 2>/dev/null; then
echo "❌ Found nested require() patterns that cause OOM in CI"
exit 1
fi
echo "✅ No nested require() patterns found"
- name: Run tests
run: yarn workspace @selfxyz/qrcode test