From efb6c66428966f3ee04e704438059cc6031fd451 Mon Sep 17 00:00:00 2001 From: Rick van Dam Date: Sun, 12 May 2024 22:02:35 +0200 Subject: [PATCH] add playwright install step --- .github/workflows/build_and_test.yml | 2 ++ Examples/AngularAuth/AngularAuth.Playwright/GlobalSetup.cs | 3 ++- Examples/Vue/Vue.Playwright/GlobalSetup.cs | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 5afc8f5..004c9f2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -50,5 +50,7 @@ jobs: ~/.nuget/packages **/obj/* key: ${{ runner.os }}-nuget_obj-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Build.props') }} + - name: Install Playwright Browsers + run: npx playwright install --with-deps chromium - name: 'Run: Test, VerifyStyle' run: ./build.cmd Test VerifyStyle diff --git a/Examples/AngularAuth/AngularAuth.Playwright/GlobalSetup.cs b/Examples/AngularAuth/AngularAuth.Playwright/GlobalSetup.cs index 71338e7..ea86ccb 100644 --- a/Examples/AngularAuth/AngularAuth.Playwright/GlobalSetup.cs +++ b/Examples/AngularAuth/AngularAuth.Playwright/GlobalSetup.cs @@ -41,7 +41,7 @@ private static void InstallPlayWright() while (true) { - var exitCode = Microsoft.Playwright.Program.Main(new[] { "install", "--with-deps", "chromium" }); + var exitCode = Microsoft.Playwright.Program.Main(["install", "--with-deps", "chromium"]); if (exitCode != 0) { @@ -58,6 +58,7 @@ private static void InstallPlayWright() } else { + Console.WriteLine($"Playwright installation failed with code {exitCode}"); return; } diff --git a/Examples/Vue/Vue.Playwright/GlobalSetup.cs b/Examples/Vue/Vue.Playwright/GlobalSetup.cs index 1bd1f50..dbd4979 100644 --- a/Examples/Vue/Vue.Playwright/GlobalSetup.cs +++ b/Examples/Vue/Vue.Playwright/GlobalSetup.cs @@ -42,7 +42,7 @@ private static void InstallPlayWright() while (true) { - var exitCode = Microsoft.Playwright.Program.Main(new[] { "install", "--with-deps", "chromium" }); + var exitCode = Microsoft.Playwright.Program.Main(["install", "--with-deps", "chromium"]); if (exitCode != 0) { @@ -59,6 +59,7 @@ private static void InstallPlayWright() } else { + Console.WriteLine($"Playwright installation failed with code {exitCode}"); return; }