Skip to content

Conversation

@mrkishi
Copy link
Member

@mrkishi mrkishi commented Mar 4, 2022

Let's see if this helps. I'm not sure the port assignment will work.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2022

⚠️ No Changeset found

Latest commit: 8c4f698

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@benmccann
Copy link
Member

Personally, I'd remove most of the ~25 different test scripts from packages/kit/package.json. If I want to run an individual set of tests I'll do something like cd test/apps/basics && pnpm test which easier for me to remember

This reverts commit 470b4fb.
@Rich-Harris
Copy link
Member

test:integration:basics etc aren't there so you can type npm run test:integration:basics instead of cd test/apps/basics && pnpm test, it's there so that test:all can look like this...

"test:all": "npm run test && npm run test:prerendering && npm run test:integration"

...instead of like this:

"test:all": "npm run test && cd test/prerendering/basics && pnpm test && cd ../options && pnpm test && cd ../../apps/amp && pnpm test && cd ../basics && pnpm test && cd ../options && pnpm test && cd ../options-2 && pnpm test"

Open to a third way if it's possible to DRY that out without introducing a lot of indirection

@mrkishi
Copy link
Member Author

mrkishi commented Mar 4, 2022

This should do!

trace: 'retain-on-failure'
}
},
workers: process.env.CI ? 2 : undefined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we had removed this purposefully not long ago. a lot of the CIs have only 1 CPU and we were worried that having multiple workers was making them compete for CPU and causing timeouts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a test, but adding full parallelization to the tests (at the pnpm level) didn't cause contention to the point of increasing run time, in fact it reduced a few percent. This is also a "max workers" setting—shouldn't playwright still use 1 worker when there's only one cpu?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think adding more workers would increase overall runtime, but it may make individual tests take longer to run

But anyway it looks like I may have been wrong that some environments only support a single CPU? I think I'm seeing now that most support 2, so this would be fine

@Rich-Harris Rich-Harris merged commit cdc32a9 into sveltejs:master Mar 4, 2022
@mrkishi mrkishi deleted the ci-testing branch March 4, 2022 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants