feat: print mem usage #62
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: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**.md' | |
| env: | |
| USE_LOCAL_URLS: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - node-version: 22.x | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # 在 pull_request 事件中,需要此行来检出头部的分支 | |
| ref: ${{ github.head_ref }} | |
| - name: Install Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-store | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.pnpm-store.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install Dependencies | |
| run: | | |
| pnpm install | |
| - name: Lint | |
| run: | | |
| pnpm lint | |
| - name: Build | |
| run: | | |
| pnpm build | |
| - name: Test | |
| run: | | |
| pnpm test | |