Skip to content

Commit e99cd22

Browse files
committed
Merge ci/gate-playwright-setup-on-buckets into test/smoke-tests-built-version
Gate the six Playwright setup steps on bucket content, combined with this branch's quarto-install guard: built/release full runs default to the smoke/ corpus (no playwright) and skip setup, while dev empty-bucket runs and playwright-bucket legs still install.
2 parents a1afdf5 + 8192de1 commit e99cd22

4 files changed

Lines changed: 47 additions & 8 deletions

File tree

‎.github/workflows/test-smokes.yml‎

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,18 @@ jobs:
120120
with:
121121
node-version: 22
122122

123+
# Playwright setup is only needed when this job can actually run the
124+
# playwright suite: a bucket containing playwright-tests.test.ts, or a
125+
# full run (empty buckets, which includes integration/). Windows never
126+
# needs it: the suite is ignored on Windows CI (playwright-tests.test.ts,
127+
# `ignore: gha.isGitHubActions() && isWindows`).
128+
# Binary/release full runs (empty buckets, quarto-install != dev) default to the smoke/ corpus and never run playwright.
123129
- name: Cache multiplex server node_modules
124-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' || (inputs.quarto-install != 'dev' && inputs.quarto-install != '') }}
130+
if: >-
131+
runner.os != 'Windows'
132+
&& (contains(inputs.buckets, 'playwright-tests.test.ts')
133+
|| (format('{0}', inputs.buckets) == ''
134+
&& (inputs.quarto-install == 'dev' || inputs.quarto-install == '')))
125135
uses: actions/cache@v5
126136
with:
127137
path: tests/integration/playwright/multiplex-server/node_modules
@@ -130,21 +140,33 @@ jobs:
130140
${{ runner.os }}-multiplex-server-
131141
132142
- name: Install node dependencies
133-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' || (inputs.quarto-install != 'dev' && inputs.quarto-install != '') }}
143+
if: >-
144+
runner.os != 'Windows'
145+
&& (contains(inputs.buckets, 'playwright-tests.test.ts')
146+
|| (format('{0}', inputs.buckets) == ''
147+
&& (inputs.quarto-install == 'dev' || inputs.quarto-install == '')))
134148
run: npm install --loglevel=error --no-audit
135149
working-directory: ./tests/integration/playwright
136150
shell: bash
137151

138152
- name: Get Playwright version
139-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' || (inputs.quarto-install != 'dev' && inputs.quarto-install != '') }}
153+
if: >-
154+
runner.os != 'Windows'
155+
&& (contains(inputs.buckets, 'playwright-tests.test.ts')
156+
|| (format('{0}', inputs.buckets) == ''
157+
&& (inputs.quarto-install == 'dev' || inputs.quarto-install == '')))
140158
run: |
141159
VERSION=$(node -p "require('@playwright/test/package.json').version")
142160
echo "PLAYWRIGHT_VERSION=$VERSION" >> "$GITHUB_ENV"
143161
working-directory: ./tests/integration/playwright
144162
shell: bash
145163

146164
- name: Cache Playwright browsers
147-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' || (inputs.quarto-install != 'dev' && inputs.quarto-install != '') }}
165+
if: >-
166+
runner.os != 'Windows'
167+
&& (contains(inputs.buckets, 'playwright-tests.test.ts')
168+
|| (format('{0}', inputs.buckets) == ''
169+
&& (inputs.quarto-install == 'dev' || inputs.quarto-install == '')))
148170
uses: actions/cache@v5
149171
with:
150172
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
@@ -153,13 +175,21 @@ jobs:
153175
${{ runner.os }}-playwright-
154176
155177
- name: Install Playwright system dependencies
156-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' || (inputs.quarto-install != 'dev' && inputs.quarto-install != '') }}
178+
if: >-
179+
runner.os != 'Windows'
180+
&& (contains(inputs.buckets, 'playwright-tests.test.ts')
181+
|| (format('{0}', inputs.buckets) == ''
182+
&& (inputs.quarto-install == 'dev' || inputs.quarto-install == '')))
157183
timeout-minutes: 15
158184
run: npx playwright install-deps
159185
working-directory: ./tests/integration/playwright
160186

161187
- name: Install Playwright Browsers
162-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' || (inputs.quarto-install != 'dev' && inputs.quarto-install != '') }}
188+
if: >-
189+
runner.os != 'Windows'
190+
&& (contains(inputs.buckets, 'playwright-tests.test.ts')
191+
|| (format('{0}', inputs.buckets) == ''
192+
&& (inputs.quarto-install == 'dev' || inputs.quarto-install == '')))
163193
timeout-minutes: 15
164194
run: npx playwright install
165195
working-directory: ./tests/integration/playwright

‎dev-docs/cross-project-dependencies.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ format of editor-support commands is a cross-project change.
6565
3. For filters: confirm inline-list membership in `prepare-dist.ts`.
6666
4. Coordinate a companion PR in the consumer if the contract changes.
6767

68+
Bumping the bundled Pandoc version counts as touching a shared surface:
69+
Pandoc Markdown-writer changes alter the visual-editor roundtrip output in
70+
`quarto-dev/quarto` and can break its snapshot tests. See the last item of
71+
[`update-pandoc-checklist.md`](update-pandoc-checklist.md).
72+
6873
## History
6974

7075
- Removing `crossref-standalone.lua` and `quarto-pre/quarto-pre.lua`: verified

‎dev-docs/update-pandoc-checklist.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ Partials:
2929

3030
- [ ] Update schemas by inspecting [their changelog](https://github.com/jgm/pandoc/blob/main/changelog.md) for new commands, deprecation removals, etc
3131
- [ ] Update lua-types if needed by inspecting the diff of [lua-filters.md](https://github.com/jgm/pandoc/commits/main/doc/lua-filters.md)
32+
- [ ] Check [`quarto-dev/quarto`](https://github.com/quarto-dev/quarto) (the visual-editor / VS Code tooling repo) for roundtrip **snapshot** test breakage on the next **prerelease**. Pandoc Markdown-*writer* changes — e.g. display-math newline handling, bullet/definition-list indentation — change visual-editor roundtrip output and break `apps/vscode/src/test/examples/generated_snapshots/*.qmd`. If output changed, open a companion PR there to regenerate the affected snapshots. Before regenerating, confirm each change is *intended* Pandoc behavior and not a transient regression (a bad snapshot can freeze a bug — see [quarto-dev/quarto#944](https://github.com/quarto-dev/quarto/pull/944)). Cross-ref: [`cross-project-dependencies.md`](cross-project-dependencies.md).

‎tests/smoke/smoke-all.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ interface QuartoInlineTestSpec {
158158
verifyFns: Verify[];
159159
}
160160

161-
// Functions to cleanup leftover testing
161+
// Functions to cleanup leftover testing.
162+
// postRenderCleanupFiles is a module-global list swept by EVERY render
163+
// teardown, so a registered entry only logs/removes at the teardowns where the
164+
// file actually exists (its owning document), not on every subsequent teardown.
162165
const postRenderCleanupFiles: string[] = [];
163166
function registerPostRenderCleanupFile(file: string): void {
164167
postRenderCleanupFiles.push(file);
@@ -168,8 +171,8 @@ const postRenderCleanup = () => {
168171
return;
169172
}
170173
for (const file of postRenderCleanupFiles) {
171-
console.log(`Cleaning up ${file} in ${Deno.cwd()}`);
172174
if (safeExistsSync(file)) {
175+
console.log(`Cleaning up ${file} in ${Deno.cwd()}`);
173176
// recursive so a registered entry can be a directory (e.g. an embedded
174177
// notebook's `*_files` support dir), not just a single file
175178
safeRemoveSync(file, { recursive: true });

0 commit comments

Comments
 (0)