Move Playwright deps & downloads out of /artifacts
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
When running `./build.cmd`, by default, test projects that use Playwright result in downloading extra dependencies (e.g. node.exe) and browser images to the artifacts directory. Hitting the network during build is something that should be avoided. One should be able to run `./restore.cmd` and then runs of `./build.cmd` should not require the network (until a dependency changes, etc.). Currently, this can more than double the time it takes for an invocation of `./build.cmd` to complete.
We should consider moving the Playwright directory out of `./artifacts` to something like `./.playwright` in the root of the repo instead.
Alternatively we might consider:
- Setting the `InstallBrowsersForPlaywright` property to false for command line builds by default
- Moving the `ProvisionBrowsersForPlaywright` target to run during test rather than build (either continuing as a target or instead move the logic into a test fixture)
Related files:
- https://github.com/dotnet/aspire/blob/fc37ee8a5bca9c899ed98afa6ebb15f45062c610/tests/Directory.Build.props#L13
- https://github.com/dotnet/aspire/blob/fc37ee8a5bca9c899ed98afa6ebb15f45062c610/tests/Shared/Playwright/Playwright.targets#L23
Contributor guide
Assessment
This issue has not been assessed yet.