Skip to content

Commit 53d6be6

Browse files
committed
fix: run playwright headless in ci
1 parent 4b2d3c2 commit 53d6be6

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
runs-on: ubuntu-22.04
1010
env:
1111
CI: true
12+
PLAYWRIGHT_HEADLESS: true
1213

1314
steps:
1415
- name: Checkout repository

BTCPayServer.Plugins.Depix.Tests/DepixPlaywrightTester.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Threading;
55
using System.Threading.Tasks;
66
using BTCPayServer.Tests;
7+
using Microsoft.Extensions.Configuration;
78
using Microsoft.Playwright;
89

910
namespace BTCPayServer.Plugins.Depix.Tests;
@@ -36,11 +37,16 @@ public class DepixPlaywrightTester : PlaywrightTester
3637
TestLogs.LogInformation("BTCPay host is reachable; continuing after sync wait timeout caused by DePix chain registration.");
3738
}
3839

40+
var builder = new ConfigurationBuilder();
41+
builder.AddUserSecrets("AB0AC1DD-9D26-485B-9416-56A33F268117");
42+
var conf = builder.Build();
3943
var playwright = await Playwright.CreateAsync();
4044
var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
4145
{
42-
Headless = Server.PayTester.InContainer,
43-
SlowMo = 0
46+
Headless = Server.PayTester.InContainer || conf["PLAYWRIGHT_HEADLESS"] == "true",
47+
ExecutablePath = conf["PLAYWRIGHT_EXECUTABLE"],
48+
SlowMo = 0,
49+
Args = ["--disable-frame-rate-limit"]
4450
});
4551
BrowserBackingField.SetValue(this, browser);
4652

0 commit comments

Comments
 (0)