Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallelism options don't work when run in workspace mode. #5933

Closed
6 tasks done
niba opened this issue Jun 20, 2024 · 1 comment · Fixed by #5934
Closed
6 tasks done

Parallelism options don't work when run in workspace mode. #5933

niba opened this issue Jun 20, 2024 · 1 comment · Fixed by #5934

Comments

@niba
Copy link

niba commented Jun 20, 2024

Describe the bug

I have monorepo and in one of my packages I have this configuration vitest.config.integration.ts

export default defineConfig({
  test: {
    environment: "node",
    name: `${packageJson.name}_integration`,
    ... some more options
    sequence: {
      hooks: 'list',
    },
    maxWorkers: 1,
    minWorkers: 1,
    fileParallelism: false,
    maxConcurrency: 1,
  },
  plugins: [swc.vite()],
});

when I run it using vitest from the root of monorepo using vite.workspaces (scan packages/*/vitest.config.integration.ts and also vitest.config.unit.ts) then disabling fileParallelism doesn't work (i'm not sure about other settings).

when I use vitest --config path-to-config then it respects the above options and don't do any parallelism.

Reproduction

Should I prepare reproduction for this case?

System Info

System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 51.61 MB / 32.00 GB
    Shell: 3.7.0 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.10.0 - ~/Library/Caches/fnm_multishells/40574_1718863130062/bin/node
    Yarn: 3.3.1 - /opt/homebrew/bin/yarn
    npm: 10.2.3 - ~/Library/Caches/fnm_multishells/40574_1718863130062/bin/npm
    pnpm: 9.4.0 - ~/Library/pnpm/pnpm
    bun: 1.0.27 - /opt/homebrew/bin/bun
  Browsers:
    Brave Browser: 118.1.59.117
    Edge: 126.0.2592.61
    Safari: 17.3.1
  npmPackages:
    @vitest/ui: 1.6.0 => 1.6.0 
    vitest: 1.6.0 => 1.6.0

Used Package Manager

pnpm

Validations

@niba niba changed the title Parallelism options don't work if run in workspace mode Parallelism options don't work when run in workspace mode. Jun 20, 2024
@sheremet-va
Copy link
Member

maxWorkers, minWorkers and fileParallelism are not supported in a workspace project config. Documentation needs to be updated to mention that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants