66 - main
77 - 3.x
88 - 2.x
9+ # Skip on docs-only / metadata-only pushes. Keep this list in SYNC with
10+ # build-and-test-skip.yml - that companion workflow reports success for
11+ # the same required-check names when this one is skipped, otherwise PRs
12+ # that only touch docs would hang forever on "Waiting for status to be
13+ # reported" (GitHub's well-known paths-filter + required-check gotcha).
14+ paths-ignore :
15+ - ' **/*.md'
16+ - ' demos/**'
17+ - ' website/**'
18+ - ' LICENSE'
19+ - ' .gitattributes'
20+ - ' .editorconfig'
21+ - ' .prettierignore'
22+ - ' .prettierrc'
23+ - ' .nvmrc'
24+ - ' .gitignore'
25+ - ' .husky/**'
26+ - ' .pre-commit-config.yaml'
27+ - ' osv-scanner.toml'
28+ - ' .github/ISSUE_TEMPLATE.md'
29+ - ' .github/PULL_REQUEST_TEMPLATE.md'
30+ - ' .github/FUNDING.yml'
31+ - ' .github/dependabot.yml'
32+ - ' .github/workflows/codeql-analysis.yml'
33+ - ' .github/workflows/dependency-review.yml'
34+ - ' .github/workflows/fuzz.yml'
35+ - ' .github/workflows/scorecard.yml'
36+ - ' .github/workflows/sign-release.yml'
37+ - ' .github/workflows/slsa-provenance.yml'
938 pull_request :
39+ paths-ignore :
40+ - ' **/*.md'
41+ - ' demos/**'
42+ - ' website/**'
43+ - ' LICENSE'
44+ - ' .gitattributes'
45+ - ' .editorconfig'
46+ - ' .prettierignore'
47+ - ' .prettierrc'
48+ - ' .nvmrc'
49+ - ' .gitignore'
50+ - ' .husky/**'
51+ - ' .pre-commit-config.yaml'
52+ - ' osv-scanner.toml'
53+ - ' .github/ISSUE_TEMPLATE.md'
54+ - ' .github/PULL_REQUEST_TEMPLATE.md'
55+ - ' .github/FUNDING.yml'
56+ - ' .github/dependabot.yml'
57+ - ' .github/workflows/codeql-analysis.yml'
58+ - ' .github/workflows/dependency-review.yml'
59+ - ' .github/workflows/fuzz.yml'
60+ - ' .github/workflows/scorecard.yml'
61+ - ' .github/workflows/sign-release.yml'
62+ - ' .github/workflows/slsa-provenance.yml'
1063
1164permissions :
1265 contents : read
1366
67+ # Cancel superseded runs on the same PR to save minutes on rapid pushes.
68+ # Pushes to protected branches are NOT cancelled - we want full CI history
69+ # for every merged commit.
70+ concurrency :
71+ group : build-test-${{ github.workflow }}-${{ github.ref }}
72+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
73+
1474jobs :
1575 # Fast feedback: lint, jsdom, chromium-only browser test across Node versions.
1676 # Runs on every push and every PR.
2989
3090 - name : Checkout
3191 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
92+ with :
93+ persist-credentials : false
3294
3395 - name : Setup Node.js ${{ matrix.node-version }}
3496 uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
@@ -39,6 +101,10 @@ jobs:
39101 - name : Install Dependencies
40102 run : npm ci
41103
104+ # All three engines - test:ci runs the full browser matrix (no
105+ # --project flag, unlike local `npm test`). DOMPurify's security
106+ # posture depends on per-engine HTML parser behaviour being exercised,
107+ # so this coverage is kept on every PR despite the download cost.
42108 - name : Install Playwright Browsers
43109 run : ./node_modules/.bin/playwright install --with-deps chromium firefox webkit
44110
53119
54120 - name : Upload Playwright report
55121 if : failure()
56- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
122+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
57123 with :
58124 name : playwright-report-node-${{ matrix.node-version }}
59125 path : playwright-report/
86152
87153 - name : Checkout
88154 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
155+ with :
156+ persist-credentials : false
89157
90158 - name : Setup Node.js 25.x
91159 uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
@@ -112,7 +180,7 @@ jobs:
112180
113181 - name : Upload Playwright report
114182 if : failure()
115- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
183+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
116184 with :
117185 name : playwright-report-${{ matrix.os }}
118186 path : playwright-report/
0 commit comments