diff options
| author | tv <tv@krebsco.de> | 2026-11-21 20:56:53 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-21 20:56:53 +0000 |
| commit | ad968b9e834bfeec1fa3a1552b7c1e1c5a3439b3 (patch) | |
| tree | 939f2e7843023bf27929393e7671924e0d4f7722 /src/api | |
| parent | 2205aa4f871f22215c2d59776c8b9b22ccbc57e9 (diff) | |
dashboard: check.nix, the browser checks' shell
docs/development.md, check.js and the browser test name it, but it never
made it into the tree. Node.js, Playwright's library and its Chromium,
all from nixpkgs (playwright-driver and its browsers, of one version),
nothing from npm.
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/dashboard/check.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/api/dashboard/check.nix b/src/api/dashboard/check.nix new file mode 100644 index 0000000..7276768 --- /dev/null +++ b/src/api/dashboard/check.nix @@ -0,0 +1,27 @@ +# Node.js with Playwright's library and its Chromium, all from nixpkgs, for the +# dashboard's browser checks (`check.js`): +# +# nix-shell src/api/dashboard/check.nix --run \ +# 'cargo test --features most dashboard_in_a_browser -- --ignored' +# +# nixpkgs builds Playwright's library (`playwright-core`) as `playwright-driver`, with +# browsers of its version in `playwright-driver.browsers`: so the two match, and nothing +# comes from npm. +{ + pkgs ? import <nixpkgs> { }, +}: +let + driver = pkgs.playwright-driver; +in +pkgs.mkShell { + packages = [ pkgs.nodejs ]; + # Where Node finds `require("playwright-core")`. + NODE_PATH = pkgs.linkFarm "continuum-dashboard-check-modules" [ + { + name = "playwright-core"; + path = driver; + } + ]; + PLAYWRIGHT_BROWSERS_PATH = driver.browsers; + PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = "true"; +} |
