Skip to content

Commit fad85eb

Browse files
authored
Merge pull request #12989 from quarto-dev/gha/ff-matrix
Debug ff-matrix gha workflow
2 parents 3281c6b + 9391b16 commit fad85eb

13 files changed

Lines changed: 82 additions & 210 deletions

File tree

Lines changed: 38 additions & 183 deletions
Original file line numberDiff line numberDiff line change
@@ -1,199 +1,54 @@
1-
# Tests all documents in the feature-format matrix
21
name: Feature-Format Tests
32
on:
43
workflow_dispatch:
4+
inputs:
5+
extra-r-packages:
6+
description: "extra R package to install for the runs (like a dev version of one of the deps) - comma separated, passed to renv::install"
7+
required: false
8+
type: string
9+
default: ""
510
schedule:
611
# run daily at 1am UTC
712
- cron: "0 1 * * *"
8-
# Deactivating run on commits for now
9-
## push:
10-
## branches: [main]
11-
## paths-ignore:
12-
## - "news/**"
13-
## - "src/resources/language/**"
14-
## pull_request:
15-
## branches: [main]
16-
## paths-ignore:
17-
## - "src/resources/language/**"
13+
push:
14+
branches: [main]
15+
paths-ignore:
16+
- "news/**"
17+
- "src/resources/language/**"
18+
- ".github/workflows/create-release.yml"
19+
- ".github/workflows/performance-check.yml"
20+
- ".github/workflows/stale-needs-repro.yml"
21+
- ".github/workflows/test-bundle.yml"
22+
- ".github/workflows/test-smokes-parallel.yml"
23+
- ".github/workflows/test-quarto-latexmk.yml"
24+
- ".github/workflows/update-test-timing.yml"
25+
pull_request:
26+
branches: [main]
27+
paths-ignore:
28+
- "news/**"
29+
- "src/resources/language/**"
30+
- ".github/workflows/create-release.yml"
31+
- ".github/workflows/performance-check.yml"
32+
- ".github/workflows/stale-needs-repro.yml"
33+
- ".github/workflows/test-bundle.yml"
34+
- ".github/workflows/test-smokes-parallel.yml"
35+
- ".github/workflows/test-quarto-latexmk.yml"
36+
- ".github/workflows/update-test-timing.yml"
1837

1938
concurrency:
20-
# Use github.run_id on main branch
21-
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
22-
# Use github.ref on other branches, so it's unique per branch
2339
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
2440
cancel-in-progress: true
2541

2642
jobs:
27-
run-smokes:
43+
run-feature-format-tests:
2844
name: Run feature-format matrix on (${{ matrix.os }})
29-
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'quarto-dev/quarto-cli')
3045
strategy:
3146
fail-fast: false
3247
matrix:
33-
os: [ubuntu-latest, windows-latest]
34-
runs-on: ${{ matrix.os }}
35-
steps:
36-
- name: Checkout Repo
37-
uses: actions/checkout@v4
38-
39-
- name: Fix temp dir to use runner one (windows)
40-
if: runner.os == 'Windows'
41-
run: |
42-
echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
43-
echo "TMP=${{ runner.temp }}" >> $GITHUB_ENV
44-
echo "TEMP=${{ runner.temp }}" >> $GITHUB_ENV
45-
shell: bash
46-
47-
- name: Set up R
48-
uses: r-lib/actions/setup-r@v2
49-
with:
50-
r-version: "4.5.0"
51-
use-public-rspm: true
52-
# required to avoid rtools bin in path
53-
windows-path-include-rtools: false
54-
55-
- name: Install node (for Playwright, MECA)
56-
uses: actions/setup-node@v4
57-
with:
58-
node-version: 16
59-
60-
- name: Install node dependencies
61-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
62-
run: yarn
63-
working-directory: ./tests/integration/playwright
64-
shell: bash
65-
66-
- name: Install Playwright Browsers
67-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
68-
run: npx playwright install --with-deps
69-
working-directory: ./tests/integration/playwright
70-
71-
- name: Install MECA validator
72-
if: ${{ runner.os != 'Windows' }}
73-
run: npm install -g meca
74-
75-
- name: Set RENV_PATHS_ROOT
76-
shell: bash
77-
run: |
78-
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV
79-
80-
- name: Get R and OS version
81-
id: get-version
82-
run: |
83-
cat("os-version=", sessionInfo()$running, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
84-
cat("r-version=", R.Version()$version.string, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
85-
shell: Rscript {0}
86-
87-
- name: Cache R packages
88-
uses: actions/cache@v4
89-
with:
90-
path: ${{ env.RENV_PATHS_ROOT }}
91-
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-${{ hashFiles('tests/renv.lock') }}
92-
restore-keys: |
93-
${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-
94-
save-always: true
95-
96-
- name: Install missing system deps
97-
if: runner.os == 'Linux'
98-
run: |
99-
sudo apt-get update -y
100-
sudo apt-get install -y libcurl4-openssl-dev
101-
sudo apt-get install -y libxml2-utils
102-
sudo apt-get install -y libharfbuzz-dev libfribidi-dev
103-
104-
- name: Restore R packages
105-
working-directory: tests
106-
run: |
107-
if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')
108-
renv::restore()
109-
# Install dev versions for our testing
110-
# Use r-universe to avoid github api calls
111-
try(install.packages('knitr', repos = 'https://yihui.r-universe.dev'))
112-
try(install.packages('rmarkdown', repos = 'https://rstudio.r-universe.dev'))
113-
shell: Rscript {0}
114-
env:
115-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
116-
117-
- name: Install uv for Python
118-
uses: astral-sh/setup-uv@v3
119-
with:
120-
version: "0.7.4"
121-
enable-cache: true
122-
cache-dependency-glob: "tests/uv.lock"
123-
124-
- name: Install Python and Dependencies
125-
working-directory: tests
126-
run: |
127-
uv sync --frozen
128-
129-
- uses: ./.github/workflows/actions/quarto-dev
130-
131-
- name: Install Tinytex
132-
env:
133-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134-
run: |
135-
quarto install tinytex
136-
137-
- name: Cache Typst packages
138-
uses: ./.github/actions/cache-typst
139-
140-
# - name: Install Chrome
141-
# uses: browser-actions/setup-chrome@v1
142-
# with:
143-
# chrome-version: 127
144-
145-
- name: Setup Julia
146-
uses: julia-actions/setup-julia@v2
147-
with:
148-
version: "1.10"
149-
150-
- name: Cache Julia Packages
151-
uses: julia-actions/cache@v2
152-
153-
- name: Restore Julia Packages
154-
working-directory: tests
155-
shell: bash
156-
run: |
157-
# Setup IJulia with the jupyter from the Python environment
158-
# https://julialang.github.io/IJulia.jl/stable/manual/installation/
159-
export JUPYTER=$(find $(dirname $(uv run --frozen which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter")
160-
uv run --frozen julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
161-
echo "Julia Jupyter:"
162-
julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))"
163-
164-
- name: Setup timing file for timed test
165-
if: ${{ matrix.time-test == true }}
166-
run: |
167-
echo "QUARTO_TEST_TIMING=timing-for-ci.txt" >> "$GITHUB_ENV"
168-
169-
# - name: Setup tmate session
170-
# uses: mxschmitt/action-tmate@v3
171-
172-
# The Check Chromium step appears necessary to avoid a crash/hang when rendering PDFs
173-
# https://github.com/quarto-dev/quarto-actions/issues/45#issuecomment-1562599451
174-
# Same fix as in quarto-actions/quarto-render
175-
# chromium is installed in the ubuntu runners in GHA, so no need to install it
176-
# - name: "Check Chromium"
177-
# if: ${{ runner.os == 'Linux' }}
178-
# run: |
179-
# echo $(which google-chrome)
180-
# $(which google-chrome) --headless --no-sandbox --disable-gpu --renderer-process-limit=1 https://www.chromestatus.com
181-
# shell: bash
182-
183-
- name: Run all Smoke Tests Windows
184-
if: ${{ runner.os == 'Windows' && format('{0}', inputs.buckets) == '' && matrix.time-test == false }}
185-
env:
186-
# Useful as TinyTeX latest release is checked in run-test.sh
187-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188-
run: ./run-tests.ps1 ../dev-docs/feature-format-matrix/qmd-files/**/*.qmd
189-
working-directory: tests
190-
shell: pwsh
191-
192-
- name: Run all Smoke Tests Linux
193-
if: ${{ runner.os != 'Windows' && format('{0}', inputs.buckets) == '' }}
194-
env:
195-
# Useful as TinyTeX latest release is checked in run-test.sh
196-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
197-
run: shopt -s globstar && ./run-tests.sh ../dev-docs/feature-format-matrix/**/*.qmd
198-
working-directory: tests
199-
shell: bash
48+
os:
49+
- ubuntu-latest
50+
- windows-latest
51+
uses: ./.github/workflows/test-smokes.yml
52+
with:
53+
buckets: '[ "../dev-docs/feature-format-matrix/qmd-files/**/*.qmd" ]'
54+
extra-r-packages: ${{ inputs.extra-r-packages }}

dev-docs/feature-format-matrix/qmd-files/crossref/float/custom/document.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ crossref:
77
reference-prefix: Diagram
88
format:
99
docusaurus-md: {}
10+
_quarto:
11+
tests-on-ci: false
1012
---
1113

1214
::: {#dia-1}

dev-docs/feature-format-matrix/qmd-files/crossref/float/table/document.qmd

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ format:
99
comment: Missing implementation
1010
pdf: *tested
1111
typst:
12-
output-ext: typ # for the test below
12+
keep-typ: true
1313
quality: 2
1414
docusaurus-md: *tested
15-
revealjs: *tested
15+
revealjs:
16+
quality: 2
17+
auto-stretch: false
1618
beamer:
1719
output-ext: tex
1820
quality: 2
@@ -38,8 +40,8 @@ _quarto:
3840
- "div#tbl-2.quarto-float figure.quarto-float.quarto-float-tbl img"
3941
- "div#tbl-1.quarto-float figure.quarto-float.quarto-float-tbl figcaption"
4042
- "div#tbl-2.quarto-float figure.quarto-float.quarto-float-tbl figcaption"
41-
- "a[href=\"#crossreferenceable-tables\"].quarto-xref"
42-
- "a[href=\"#as-images\"].quarto-xref"
43+
- "a[href=\"#/tbl-1\"].quarto-xref"
44+
- "a[href=\"#/tbl-2\"].quarto-xref"
4345
latex: &latex-tests
4446
ensureFileRegexMatches:
4547
-
@@ -51,12 +53,12 @@ _quarto:
5153
- "\\\\includegraphics.*media.*table\\.jpg"
5254
beamer: *latex-tests
5355
typst:
54-
ensureFileRegexMatches:
56+
ensureTypstFileRegexMatches:
5557
-
56-
- "\\<tbl-1\\>"
57-
- "\\<tbl-2\\>"
58-
- "@tbl-1"
59-
- "@tbl-2"
58+
- '\<tbl-1\>'
59+
- '\<tbl-2\>'
60+
- '#ref\(\<tbl-1\>, supplement: \[Table\]\)'
61+
- '#ref\(\<tbl-2\>, supplement: \[Table\]\)'
6062
docusaurus-md:
6163
ensureFileRegexMatches:
6264
-

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-python-label.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ _quarto:
1818
typst:
1919
ensureTypstFileRegexMatches:
2020
-
21-
- "#align\\(right\\)\\[(\r\n?|\n)#box"
21+
- '#align\(right\)\[(\r\n?|\n)?#box'
2222
-
23-
- "#block\\[(\r\n?|\n)#align\\(right\\)\\["
23+
- '#block\[(\r\n?|\n)?#align\(right\)\['
2424
---
2525

2626

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-python-nocaption.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ _quarto:
1818
typst:
1919
ensureTypstFileRegexMatches:
2020
-
21-
- "#align\\(right\\)\\[(\r\n?|\n)#box"
21+
- '#align\(right\)\[(\r\n?|\n)?#box'
2222
-
23-
- "#block\\[(\r\n?|\n)#align\\(right\\)\\["
23+
- '#block\[(\r\n?|\n)?#align\(right\)\['
2424
---
2525

2626

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/code-r-nocaption.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ _quarto:
1818
typst:
1919
ensureTypstFileRegexMatches:
2020
-
21-
- "#align\\(right\\)\\[(\r\n?|\n)#box"
21+
- '#align\(right\)\[(\r\n?|\n)?#box'
2222
-
23-
- "#block\\[(\r\n?|\n)#align\\(right\\)\\["
23+
- '#block\[(\r\n?|\n)?#align\(right\)\['
2424
---
2525

2626
```{r}

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-caption.qmd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ format:
1313
pptx:
1414
quality: -1
1515
keep-typ: true
16+
keep-tex: true
1617
_quarto:
1718
tests:
18-
latex:
19-
ensureFileRegexMatches:
19+
pdf:
20+
ensureLatexFileRegexMatches:
2021
-
21-
- '\\hfill\\includegraphics\{100.png\}'
22+
- '\\hfill\\pandocbounded\{\\includegraphics\[keepaspectratio\]\{100.png\}'
2223
- []
2324
typst:
2425
ensureTypstFileRegexMatches:

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-nocaption.qmd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ format:
1313
pptx:
1414
quality: -1
1515
keep-typ: true
16+
keep-tex: true
1617
_quarto:
1718
tests:
18-
latex:
19-
ensureFileRegexMatches:
19+
pdf:
20+
ensureLatexFileRegexMatches:
2021
-
21-
- '\\hfill\\includegraphics\{100.png\}'
22+
- '\\hfill\\pandocbounded\{\\includegraphics\[keepaspectratio\]\{100.png\}'
2223
- []
2324
typst:
2425
ensureTypstFileRegexMatches:

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-noid-nocaption.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ _quarto:
1818
typst:
1919
ensureTypstFileRegexMatches:
2020
-
21-
- "#align\\(right\\)\\[(\r\n?|\n)#box"
21+
- '#align\(right\)\[(\r\n?|\n)?#box'
2222
-
23-
- "#block\\[(\r\n?|\n)#align\\(right\\)\\["
23+
- '#block\[(\r\n?|\n)?#align\(right\)\['
2424
---
2525

2626
![](100.png){fig-align="right"}

dev-docs/feature-format-matrix/qmd-files/mermaid/document.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Mermaid
33
format:
44
docusaurus-md: {}
5+
_quarto:
6+
tests-on-ci: false
57
---
68

79
::: {.content-visible when-format="docusaurus-md"}

0 commit comments

Comments
 (0)