feat: bump SDK to beta.23 — add oraclePriceE6 to engine parser #3042
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Suite | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| # Cancel in-progress runs on same branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup pnpm | |
| run: npm install -g pnpm@9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Build dependency order: shared → api/keeper/indexer | |
| - name: Build shared package | |
| run: pnpm --filter @percolator/shared build | |
| - name: Run unit tests (shared) | |
| run: pnpm --filter @percolator/shared test | |
| - name: Run unit tests (api) | |
| run: pnpm --filter @percolator/api test | |
| - name: Run unit tests (keeper) | |
| run: pnpm --filter @percolator/keeper test | |
| - name: Run unit tests (indexer) | |
| run: pnpm --filter @percolator/indexer test | |
| - name: Run unit tests (app) | |
| run: pnpm --filter app test | |
| - name: Upload coverage (shared) | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| if: always() && env.HAS_CODECOV_TOKEN == 'true' | |
| with: | |
| files: ./packages/shared/coverage/coverage-final.json | |
| flags: unit-shared | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| continue-on-error: true | |
| - name: Upload coverage (api) | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| if: always() && env.HAS_CODECOV_TOKEN == 'true' | |
| with: | |
| files: ./packages/api/coverage/coverage-final.json | |
| flags: unit-api | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| continue-on-error: true | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| RPC_URL: ${{ secrets.DEVNET_RPC_URL || 'https://api.devnet.solana.com' }} | |
| DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }} | |
| HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup pnpm | |
| run: npm install -g pnpm@9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Build dependency order before running tests | |
| - name: Build shared package | |
| run: pnpm --filter @percolator/shared build | |
| - name: Run integration tests (api) | |
| run: pnpm --filter @percolator/api test | |
| - name: Run integration tests (indexer) | |
| run: pnpm --filter @percolator/indexer test | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| if: always() && env.HAS_CODECOV_TOKEN == 'true' | |
| with: | |
| files: ./packages/api/coverage/coverage-final.json | |
| flags: integration | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| continue-on-error: true | |
| e2e-tests: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| RPC_URL: ${{ secrets.DEVNET_RPC_URL || 'https://api.devnet.solana.com' }} | |
| TEST_WALLET_PRIVATE_KEY: ${{ secrets.TEST_WALLET_PRIVATE_KEY }} | |
| BASE_URL: http://localhost:3000 | |
| # Privy validates appId.length === 25 exactly; use the secret when available, | |
| # otherwise fall back to a 25-char placeholder so the server starts in CI. | |
| NEXT_PUBLIC_PRIVY_APP_ID: ${{ secrets.NEXT_PUBLIC_PRIVY_APP_ID || 'cltestappid00000000000000' }} | |
| NEXT_PUBLIC_DEFAULT_NETWORK: devnet | |
| NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL || 'https://percolator-api-production.up.railway.app' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup pnpm | |
| run: npm install -g pnpm@9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Build application | |
| run: pnpm run build | |
| # Playwright auto-starts the production server (pnpm start) via webServer config. | |
| # The check below skips E2E when no test files exist (e.g. new packages). | |
| - name: Check for E2E tests | |
| id: e2e-check | |
| run: | | |
| if [ -d "e2e" ] || [ -d "tests/e2e" ] || compgen -G "**/*.e2e.ts" > /dev/null 2>&1; then | |
| echo "has_tests=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_tests=false" >> "$GITHUB_OUTPUT" | |
| echo "ℹ️ No E2E test files found — skipping" | |
| fi | |
| - name: Run E2E tests | |
| if: steps.e2e-check.outputs.has_tests == 'true' | |
| run: pnpm run test:e2e | |
| - name: Upload Playwright report | |
| if: always() && steps.e2e-check.outputs.has_tests == 'true' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| - name: Upload test results | |
| if: always() && steps.e2e-check.outputs.has_tests == 'true' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: test-results | |
| path: test-results/ | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| coverage-check: | |
| name: Coverage Gate | |
| runs-on: ubuntu-latest | |
| needs: [unit-tests, integration-tests] | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Check coverage thresholds | |
| run: | | |
| echo "📊 Coverage check" | |
| echo "⚠️ Coverage gate temporarily disabled until tests are implemented" | |
| echo "✅ Once tests are written, this will enforce:" | |
| echo " - Overall coverage ≥90%" | |
| echo " - Critical paths 100%" | |
| echo " - No coverage regressions" | |
| security-tests: | |
| name: Security Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup pnpm | |
| run: npm install -g pnpm@9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Fail on high+ severity. Accepted findings are listed in root package.json | |
| # pnpm.auditConfig (must match SECURITY-DEPS.md). | |
| - name: Build shared package | |
| run: pnpm --filter @percolator/shared build | |
| - name: Run security audit | |
| run: pnpm audit --audit-level=high | |
| - name: Run security tests (shared) | |
| run: pnpm --filter @percolator/shared test | |
| - name: Run security tests (api) | |
| run: pnpm --filter @percolator/api test | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup pnpm | |
| run: npm install -g pnpm@9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Type check | |
| env: | |
| NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL || 'https://percolator-api-production.up.railway.app' }} | |
| run: pnpm run build | |
| merge-gate: | |
| name: ✅ Merge Gate | |
| runs-on: ubuntu-latest | |
| needs: [unit-tests, integration-tests, e2e-tests, security-tests, type-check] | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: All checks passed | |
| run: | | |
| echo "✅ All test suites passed" | |
| echo "✅ Type checking passed" | |
| echo "✅ Security checks passed" | |
| echo "🚀 Ready to merge" |