ci: run browser quality on native Windows (#2)
This commit was merged in pull request #2.
This commit is contained in:
@@ -11,14 +11,17 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Secret scan
|
- name: Secret scan
|
||||||
uses: trufflesecurity/trufflehog@v3.79.0
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
path: ./
|
set -euo pipefail
|
||||||
extra_args: --only-verified
|
scan_container="$(docker create ghcr.io/trufflesecurity/trufflehog:3.79.0 filesystem /scan --only-verified --fail --no-update)"
|
||||||
|
trap 'docker rm -f "${scan_container}" >/dev/null 2>&1 || true' EXIT
|
||||||
|
tar --exclude=.git --transform='s#^\.$#scan#;s#^\./#scan/#' -cf - . | docker cp - "${scan_container}:/"
|
||||||
|
docker start -a "${scan_container}"
|
||||||
|
|
||||||
quality:
|
quality:
|
||||||
# Node, Playwright and the browser gate are supported by the shared Linux pool.
|
# Browser quality runs against the dedicated bounded Windows 11 VM runner.
|
||||||
runs-on: ubuntu-latest
|
runs-on: windows-native
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
@@ -27,7 +30,7 @@ jobs:
|
|||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run quality
|
- run: npm run quality
|
||||||
- run: npx playwright install --with-deps chromium
|
- run: npx playwright install chromium
|
||||||
- run: npm run test:browser:ci
|
- run: npm run test:browser:ci
|
||||||
- name: Preserve browser failure evidence
|
- name: Preserve browser failure evidence
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ test('a watched repository is read on filesystem activity instead of on every in
|
|||||||
|
|
||||||
revision = 2;
|
revision = 2;
|
||||||
await writeFile(path.join(root, 'feature.txt'), 'changed\n');
|
await writeFile(path.join(root, 'feature.txt'), 'changed\n');
|
||||||
|
// Exercise the monitor's filesystem-activity boundary deterministically.
|
||||||
|
// Native fs.watch delivery is platform/overlay specific and is covered by
|
||||||
|
// the product's safety interval rather than by this unit test.
|
||||||
|
monitor.noteFilesystemChange(root);
|
||||||
// The watcher debounce and the per-repository cooldown both apply here.
|
// The watcher debounce and the per-repository cooldown both apply here.
|
||||||
const deadline = Date.now() + 5_000;
|
const deadline = Date.now() + 5_000;
|
||||||
while (changes.length === 0 && Date.now() < deadline) {
|
while (changes.length === 0 && Date.now() < deadline) {
|
||||||
|
|||||||
Reference in New Issue
Block a user