diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 8da6269d71..6670399f90 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -85,14 +85,9 @@ jobs:
restore-keys: |
nuget-${{ runner.os }}-
- - name: Docker Setup Docker
- if: matrix.os == 'ubuntu-latest'
- uses: docker/setup-docker-action@v5.0.0
-
- name: Cache Playwright Browsers
uses: actions/cache@v5
continue-on-error: true
- id: playwright-cache
with:
path: |
~/.cache/ms-playwright
@@ -102,13 +97,9 @@ jobs:
restore-keys: |
playwright-${{ runner.os }}-
- - name: Install Playwright
- run: npx playwright install --with-deps
- if: steps.playwright-cache.outputs.cache-hit != 'true'
-
- - name: Install Playwright (browsers only)
- run: npx playwright install
- if: steps.playwright-cache.outputs.cache-hit == 'true'
+ - name: Docker Setup Docker
+ if: matrix.os == 'ubuntu-latest'
+ uses: docker/setup-docker-action@v5.0.0
- name: Enable Long Paths on Windows
if: matrix.os == 'windows-latest'
diff --git a/TUnit.CI.slnx b/TUnit.CI.slnx
index 1cb546d87b..19f3b65391 100644
--- a/TUnit.CI.slnx
+++ b/TUnit.CI.slnx
@@ -100,8 +100,9 @@
-
+
+
diff --git a/TUnit.Pipeline/Modules/InstallPlaywrightModule.cs b/TUnit.Pipeline/Modules/InstallPlaywrightModule.cs
new file mode 100644
index 0000000000..3a065e64de
--- /dev/null
+++ b/TUnit.Pipeline/Modules/InstallPlaywrightModule.cs
@@ -0,0 +1,14 @@
+using ModularPipelines.Context;
+using ModularPipelines.Models;
+using ModularPipelines.Modules;
+using ModularPipelines.Options;
+
+namespace TUnit.Pipeline.Modules;
+
+public class InstallPlaywrightModule : Module
+{
+ protected override async Task ExecuteAsync(IModuleContext context, CancellationToken cancellationToken) =>
+ await context.Shell.Bash.Command(
+ new BashCommandOptions("npx playwright install --with-deps"),
+ cancellationToken);
+}
diff --git a/TUnit.Pipeline/Modules/RunPlaywrightTestsModule.cs b/TUnit.Pipeline/Modules/RunPlaywrightTestsModule.cs
index 37cc00c82c..e98a92b8ec 100644
--- a/TUnit.Pipeline/Modules/RunPlaywrightTestsModule.cs
+++ b/TUnit.Pipeline/Modules/RunPlaywrightTestsModule.cs
@@ -6,7 +6,8 @@
namespace TUnit.Pipeline.Modules;
-[NotInParallel("NetworkTests"), RunOnLinuxOnly, RunOnWindowsOnly]
+[NotInParallel("NetworkTests")]
+[DependsOn]
public class RunPlaywrightTestsModule : TestBaseModule
{
protected override Task<(DotNetRunOptions Options, CommandExecutionOptions? ExecutionOptions)> GetTestOptions(IModuleContext context, string framework, CancellationToken cancellationToken)
@@ -16,12 +17,13 @@ public class RunPlaywrightTestsModule : TestBaseModule
return Task.FromResult<(DotNetRunOptions, CommandExecutionOptions?)>((
new DotNetRunOptions
{
- Project = project.FullName,
+ Project = project.Name,
NoBuild = true,
Configuration = "Release",
},
new CommandExecutionOptions
{
+ WorkingDirectory = project.Directory!.FullName,
EnvironmentVariables = new Dictionary
{
["DISABLE_GITHUB_REPORTER"] = "true",