tech-debt: enforce no-explicit-any as warn and no-unused-vars as error #707
Workflow file for this run
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: Branch Protection | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| security-audit: | |
| runs-on: ubuntu-latest | |
| name: Dependency Security Audit | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate audit report | |
| run: pnpm audit --json > audit-report.json || true | |
| - name: Run security audit (block on high/critical) | |
| run: pnpm audit --audit-level=high | |
| - name: Upload audit report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependency-audit-report | |
| path: audit-report.json | |
| retention-days: 30 | |
| quality-checks: | |
| runs-on: ubuntu-latest | |
| name: Type Check, Lint & Validation | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run Type Check | |
| run: pnpm run type-check | |
| - name: Run Lint | |
| run: pnpm run lint | |
| - name: Validate UI | |
| run: pnpm run validate:ui | |
| - name: Validate Web3 | |
| run: pnpm run validate:web3 | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [quality-checks] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run Build | |
| run: pnpm run build | |
| env: | |
| NEXT_PUBLIC_STARKNET_NETWORK: goerli-alpha | |
| - name: Verify Build Output | |
| run: | | |
| if [ -f .next/build-manifest.json ]; then | |
| echo "✅ Build completed successfully" | |
| else | |
| echo "❌ Build failed - no manifest found" | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run Tests | |
| shell: bash | |
| run: | | |
| if timeout 30s pnpm vitest run --coverage; then | |
| echo "Tests completed within the 30-second limit." | |
| else | |
| status=$? | |
| if [ "$status" -eq 124 ]; then | |
| echo "Tests exceeded the 30-second limit; skipping the test check." | |
| exit 0 | |
| fi | |
| exit "$status" | |
| fi |