Skip to content

Commit ed0fd5f

Browse files
committed
use test-smokes.yml for ff-matrix
1 parent 4f119b0 commit ed0fd5f

File tree

1 file changed

+18
-199
lines changed

1 file changed

+18
-199
lines changed
Lines changed: 18 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Tests all documents in the feature-format matrix
21
name: Feature-Format Tests
32
on:
43
workflow_dispatch:
@@ -11,17 +10,23 @@ on:
1110
schedule:
1211
# run daily at 1am UTC
1312
- cron: "0 1 * * *"
14-
# Deactivating run on commits for now
15-
## push:
16-
## branches: [main]
17-
## paths-ignore:
18-
## - "news/**"
19-
## - "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"
2025
pull_request:
2126
branches: [main]
2227
paths-ignore:
28+
- "news/**"
2329
- "src/resources/language/**"
24-
# don't run on PR working on other workflows
2530
- ".github/workflows/create-release.yml"
2631
- ".github/workflows/performance-check.yml"
2732
- ".github/workflows/stale-needs-repro.yml"
@@ -31,205 +36,19 @@ on:
3136
- ".github/workflows/update-test-timing.yml"
3237

3338
concurrency:
34-
# Use github.run_id on main branch
35-
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
36-
# Use github.ref on other branches, so it's unique per branch
3739
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
3840
cancel-in-progress: true
3941

4042
jobs:
41-
run-smokes:
43+
run-feature-format-tests:
4244
name: Run feature-format matrix on (${{ matrix.os }})
43-
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'quarto-dev/quarto-cli')
4445
strategy:
4546
fail-fast: false
4647
matrix:
4748
os:
4849
- ubuntu-latest
4950
- windows-latest
50-
runs-on: ${{ matrix.os }}
51-
steps:
52-
- name: Checkout Repo
53-
uses: actions/checkout@v4
54-
55-
- name: Fix temp dir to use runner one (windows)
56-
if: runner.os == 'Windows'
57-
run: |
58-
echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
59-
echo "TMP=${{ runner.temp }}" >> $GITHUB_ENV
60-
echo "TEMP=${{ runner.temp }}" >> $GITHUB_ENV
61-
shell: bash
62-
63-
- name: Set up R
64-
uses: r-lib/actions/setup-r@v2
65-
with:
66-
r-version: "4.5.0"
67-
use-public-rspm: true
68-
# required to avoid rtools bin in path
69-
windows-path-include-rtools: false
70-
71-
- name: Install node (for Playwright, MECA)
72-
uses: actions/setup-node@v4
73-
with:
74-
node-version: 20
75-
76-
- name: Install node dependencies
77-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
78-
run: yarn
79-
working-directory: ./tests/integration/playwright
80-
shell: bash
81-
82-
- name: Install Playwright Browsers
83-
if: ${{ runner.os != 'Windows' || github.event_name == 'schedule' }}
84-
run: npx playwright install --with-deps
85-
working-directory: ./tests/integration/playwright
86-
87-
- name: Install MECA validator
88-
if: ${{ runner.os != 'Windows' }}
89-
run: npm install -g meca
90-
91-
- name: Set RENV_PATHS_ROOT
92-
shell: bash
93-
run: |
94-
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV
95-
96-
- name: Get R and OS version
97-
id: get-version
98-
run: |
99-
cat("os-version=", sessionInfo()$running, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
100-
cat("r-version=", R.Version()$version.string, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
101-
shell: Rscript {0}
102-
103-
- name: Restore Renv package cache
104-
id: cache-renv-packages-restore
105-
uses: actions/cache/restore@v4
106-
with:
107-
path: |
108-
${{ env.RENV_PATHS_ROOT }}
109-
renv/library
110-
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-3-${{ hashFiles('tests/renv.lock') }}
111-
restore-keys: |
112-
${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-3-
113-
114-
- name: Install missing system deps
115-
if: runner.os == 'Linux'
116-
run: |
117-
sudo apt-get update -y
118-
sudo apt-get install -y libcurl4-openssl-dev
119-
sudo apt-get install -y libxml2-utils
120-
sudo apt-get install -y libharfbuzz-dev libfribidi-dev
121-
sudo apt-get install -y poppler-utils
122-
123-
- name: Restore R packages
124-
working-directory: tests
125-
run: |
126-
if (!requireNamespace('renv', quietly = TRUE)) install.packages('renv')
127-
renv::restore()
128-
# Install dev versions for our testing
129-
# Use r-universe to avoid github api calls
130-
try(install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos'))))
131-
try(install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos'))))
132-
if ('${{ inputs.extra-r-packages }}' != '') {
133-
cat(sprintf("::notice::Running with the following extra R packages for pak: %s\n", "${{ inputs.extra-r-packages }}"))
134-
renv::install(strsplit("${{ inputs.extra-r-packages }}", split = ",")[[1]])
135-
}
136-
shell: Rscript {0}
137-
env:
138-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
139-
140-
- name: Show R session information
141-
working-directory: tests
142-
run: |
143-
# Session info
144-
cat("::group::Session info\n")
145-
renv::install("sessioninfo")
146-
sessioninfo::session_info(pkgs = "installed", include_base = TRUE)
147-
cat("::endgroup::\n")
148-
shell: Rscript {0}
149-
150-
- name: Install uv for Python
151-
uses: astral-sh/setup-uv@v3
152-
with:
153-
version: "0.7.4"
154-
enable-cache: true
155-
cache-dependency-glob: "tests/uv.lock"
156-
157-
- name: Install Python and Dependencies
158-
working-directory: tests
159-
run: |
160-
uv sync --frozen
161-
162-
- uses: ./.github/workflows/actions/quarto-dev
163-
164-
- name: Install Tinytex
165-
env:
166-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167-
run: |
168-
quarto install tinytex
169-
170-
- name: Cache Typst packages
171-
id: cache-typst
172-
uses: ./.github/actions/cache-typst
173-
174-
- name: Install Chrome
175-
uses: browser-actions/setup-chrome@latest
176-
177-
- name: Setup Julia
178-
uses: julia-actions/setup-julia@v2
179-
with:
180-
version: "1.11.3"
181-
182-
- name: Cache Julia Packages
183-
uses: julia-actions/cache@v2
184-
185-
- name: Restore Julia Packages
186-
working-directory: tests
187-
shell: bash
188-
run: |
189-
# Setup IJulia with the jupyter from the Python environment
190-
# https://julialang.github.io/IJulia.jl/stable/manual/installation/
191-
export JUPYTER=$(find $(dirname $(uv run --frozen which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter")
192-
uv run --frozen julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
193-
echo "Julia Jupyter:"
194-
uv run julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))"
195-
196-
# - name: Setup tmate session
197-
# uses: mxschmitt/action-tmate@v3
198-
199-
# we run from tests directory as our environment for R, Python and Julia is set up there
200-
- name: Run all feature-format-matrix Tests Windows
201-
if: ${{ runner.os == 'Windows' }}
202-
env:
203-
# Useful as TinyTeX latest release is checked in run-test.sh
204-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
205-
run: ./run-tests.ps1 ../dev-docs/feature-format-matrix/qmd-files/**/*.qmd
206-
working-directory: tests
207-
shell: pwsh
208-
209-
- name: Run all feature-format-matrix Tests Linux
210-
if: ${{ runner.os != 'Windows' }}
211-
env:
212-
# Useful as TinyTeX latest release is checked in run-test.sh
213-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214-
run: |
215-
shopt -s globstar &&
216-
./run-tests.sh ../dev-docs/feature-format-matrix/**/*.qmd
217-
working-directory: tests
218-
shell: bash
219-
220-
- name: Save Typst cache
221-
if: always() && steps.cache-typst.outputs.cache-hit != 'true'
222-
uses: actions/cache/save@v4
223-
with:
224-
key: ${{ steps.cache-typst.outputs.cache-primary-key }}
225-
path: ${{ steps.cache-typst.outputs.cache-path }}
226-
227-
- name: Save Renv package cache
228-
# don't save cache if we have extra R packages
229-
if: ${{ always() && steps.cache-renv-packages-restore.outputs.cache-hit != 'true' && inputs.extra-r-packages == '' }}
230-
uses: actions/cache/save@v4
231-
with:
232-
path: |
233-
${{ env.RENV_PATHS_ROOT }}
234-
renv/library
235-
key: ${{ steps.cache-renv-packages-restore.outputs.cache-primary-key }}
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 }}

0 commit comments

Comments
 (0)