fix: clear cached wallet data and repair the TopNav sign-out flow on … #300
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - staging | |
| pull_request: | |
| branches: | |
| - main | |
| - staging | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Verify pnpm lockfile is the only lockfile | |
| run: | | |
| if [ -f package-lock.json ] || [ -f yarn.lock ] || [ -f npm-shrinkwrap.json ]; then | |
| echo "::error::Found a non-pnpm lockfile. This repo only tracks pnpm-lock.yaml." | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| # Runs `tsc --noEmit` against the same tsconfig.json used by `next | |
| # build` (via the `next` compiler plugin), so a type error here is | |
| # guaranteed to also fail the build step below. This job intentionally | |
| # runs before build/test so type errors fail fast. | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| unit-tests: | |
| name: Unit tests (Vitest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run unit/component tests | |
| run: pnpm test | |
| build: | |
| name: Build (${{ matrix.network }}) | |
| needs: [typecheck, unit-tests] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # `next build` type-checks and statically analyzes every route, | |
| # including the API routes that branch on NEXT_PUBLIC_API_URL | |
| # (see src/app/api/auth/login/route.ts and | |
| # src/lib/api/config.ts::getApiBaseUrl()). Building once with a | |
| # testnet-shaped URL and once with a mainnet-shaped URL catches | |
| # env-specific breakage before it reaches either environment. | |
| network: [testnet, mainnet] | |
| include: | |
| - network: testnet | |
| api_url: https://testnet-api.example.com | |
| - network: mainnet | |
| api_url: https://api.example.com | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm run build | |
| env: | |
| NEXT_PUBLIC_API_URL: ${{ matrix.api_url }} |