Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions docker/jenkins/Dockerfile.ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ RUN add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_r
RUN apt-get update && apt-get install -y cmake r-base
RUN cmake --version

# The real-R integration tier (test/integration-r, run via `npm run test:r`)
# launches actual Shiny apps, so the image needs the shiny package, not just
# r-base. Without it that tier skips itself and the build looks green while
# testing nothing.
RUN Rscript -e 'install.packages("shiny", repos = "https://packagemanager.posit.co/cran/__linux__/focal/latest")'
RUN Rscript -e 'stopifnot(requireNamespace("shiny", quietly = TRUE))'

ARG JENKINS_GID=999
ARG JENKINS_UID=999
RUN groupadd -g $JENKINS_GID jenkins && \
Expand Down
17 changes: 13 additions & 4 deletions memory-bank/testingGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,20 @@ be named explicitly wherever tests are invoked:
never loads it directly.

There is no watch mode, no coverage tooling, and no linting step. Two CI systems run
this: `.github/workflows/ci.yml` (Linux + macOS, plus a build-freshness check and the
real-R tier) and Jenkins, which uses the vendored interpreter —
`Jenkinsfile:108` runs `./bin/node ./node_modules/mocha/bin/mocha test test/integration`.
this: `.github/workflows/ci.yml` (Linux + macOS, plus a build-freshness check) and
Jenkins, which uses the vendored interpreter — `Jenkinsfile:108` runs
`./bin/node ./node_modules/mocha/bin/mocha test test/integration`.
**Keep that list of directories in sync with `package.json`'s `test` script**; a new
test directory that isn't added in both places silently doesn't run.
test directory that isn't added in both places silently doesn't run. (Note
`Jenkinsfile.internal:138` still runs `mocha test` only, so the internal build skips
the integration tier.)

**The real-R tier runs on GitHub Actions only.** The Jenkins images deliberately do not
install the `shiny` R package: Jenkins runs `mocha test test/integration`, never
`npm run test:r`, so provisioning R packages there would build a toolchain nothing
uses — and it broke the ubuntu-20.04 image, whose R falls back to compiling from
source, where `shiny -> bslib -> sass -> fs` needs libuv. Jenkins is expected to be
retired after the current round of refactors; don't add R provisioning back to it.

`.mocharc.json` auto-requires three modules before any test file, and sets a timeout
that a server boot can survive (mocha's 2s default cannot):
Expand Down
Loading