fix(FR-2606): replace webpackIgnore with @vite-ignore in dynamic plugin imports #3
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: Run Vitest on /react, /packages/backend.ai-ui, and /scripts | |
| on: | |
| pull_request: | |
| paths: | |
| - react/src/** | |
| - react/package.json | |
| - react/vitest.config.ts | |
| - packages/backend.ai-ui/src/** | |
| - packages/backend.ai-ui/package.json | |
| - packages/backend.ai-ui/vitest.config.ts | |
| - scripts/** | |
| - src/** | |
| - vitest.config.ts | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| react-changed: ${{ steps.changes.outputs.react }} | |
| backend-ai-ui-changed: ${{ steps.changes.outputs.backend-ai-ui }} | |
| root-changed: ${{ steps.changes.outputs.root }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| react: | |
| - 'react/src/**' | |
| - 'react/package.json' | |
| - 'react/vitest.config.ts' | |
| backend-ai-ui: | |
| - 'packages/backend.ai-ui/src/**' | |
| - 'packages/backend.ai-ui/package.json' | |
| - 'packages/backend.ai-ui/vitest.config.ts' | |
| root: | |
| - 'scripts/**' | |
| - 'src/**' | |
| - 'vitest.config.ts' | |
| react-vitest: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.react-changed == 'true' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./react | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: latest | |
| run_install: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - uses: actions/cache@v5 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| working-directory: . | |
| run: pnpm install --merge-git-branch-lockfiles --no-frozen-lockfile | |
| - name: Run ESLint on React | |
| run: pnpm run lint | |
| - name: Run relay-compiler | |
| run: pnpm run relay | |
| - name: Run Vitest | |
| run: pnpm run vitest | |
| backend-ai-ui-vitest: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.backend-ai-ui-changed == 'true' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./packages/backend.ai-ui | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: latest | |
| run_install: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - uses: actions/cache@v5 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| working-directory: . | |
| run: pnpm install --merge-git-branch-lockfiles --no-frozen-lockfile | |
| - name: Run ESLint on backend.ai-ui | |
| run: pnpm run lint | |
| - name: Run relay-compiler | |
| run: cd ../.. && pnpm run relay | |
| - name: Run Vitest | |
| run: pnpm run vitest | |
| root-vitest: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.root-changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: latest | |
| run_install: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - uses: actions/cache@v5 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --merge-git-branch-lockfiles --no-frozen-lockfile | |
| - name: Run Vitest | |
| run: pnpm run vitest |