ext: move token fetch to background thread to avoid race conditions #626
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: "CI" | |
| on: | |
| push: | |
| env: | |
| NODE_VERSION: 22.22 | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| defaults: | |
| run: | |
| working-directory: extension | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| package_json_file: extension/package.json | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| cache-dependency-path: extension/pnpm-lock.yaml | |
| - run: pnpm install | |
| - name: Run all tests | |
| run: pnpm run test | |
| build: | |
| runs-on: macos-latest | |
| defaults: | |
| run: | |
| working-directory: extension | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| package_json_file: extension/package.json | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| cache-dependency-path: extension/pnpm-lock.yaml | |
| - run: pnpm install | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Check types | |
| run: pnpm run typecheck | |
| - name: Build | |
| run: pnpm run build | |
| website: | |
| runs-on: macos-latest | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| package_json_file: web/package.json | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| cache-dependency-path: web/pnpm-lock.yaml | |
| - run: pnpm install | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Build Astro site | |
| run: pnpm run build | |
| - name: Check types | |
| run: pnpm run typecheck | |
| - name: Generate token key for tests | |
| id: generate-token-key | |
| run: echo "token_key=$(openssl rand -hex 32)" >> $GITHUB_OUTPUT | |
| - name: Test | |
| run: pnpm run test | |
| env: | |
| TOKEN_KEY: ${{ steps.generate-token-key.outputs.token_key }} | |
| YNAB_CLIENT_ID: fake-client-id | |
| YNAB_SECRET: fake-client-secret |