Skip to content

ci: run the test matrix on the runner natively, not in a Debian container - #389

Merged
dkastl merged 2 commits into
nextfrom
ci/runner-native-tests
Jun 14, 2026
Merged

ci: run the test matrix on the runner natively, not in a Debian container#389
dkastl merged 2 commits into
nextfrom
ci/runner-native-tests

Conversation

@dkastl

@dkastl dkastl commented Jun 14, 2026

Copy link
Copy Markdown
Member

Motivation

Every matrix job pulled a ruby:*-bullseye image and then apt-installed build tools, Chrome, and Node (via NodeSource) from deb.debian.org. Those downloads were the source of the recurring Error reading from server - read (104: Connection reset by peer) failures that flaked random single matrix jobs across the last several PRs (#383, #385, #386, #388), each needing a manual re-run.

Change

Switch the test job to the standard runner-native GitHub Actions pattern, which removes almost all of that download surface:

  • Drop container: ruby:*-bullseye; run directly on ubuntu-latest.
  • ruby/setup-ruby@v1 for the matrix Ruby (3.3 / 3.4) — prebuilt binaries, no apt.
  • actions/setup-node@v6 for Node — drops the NodeSource apt step (already used by the frontend job).
  • apt only for native-gem headers (libpq-dev for pg, libgeos-dev for rgeo-geos) from Ubuntu's Azure-hosted mirrors, which are far more reliable on GH runners than deb.debian.org. gcc/make/patch and Chrome (for the system test) are preinstalled on the runner.
  • DB host → 127.0.0.1: the postgis service is reachable by service name only from inside a job container; on the runner host it's published on localhost via the existing ports: 5432:5432 mapping. (This is the one functional gotcha of dropping the container.)

Tradeoffs

  • The host OS for the Ruby side becomes Ubuntu 24.04 instead of Debian 11. This does not affect plugin-level tests (Ruby + Redmine + PostGIS) — native gems just compile against the runner's libraries. It's the pattern most Redmine-plugin CIs use.
  • The only thing the container provided was an OS close to a deployment image, which isn't a goal for plugin CI and isn't worth the recurring flakes.

No change to coverage: same Redmine/Ruby/PostGIS matrix, same unit/functional/integration/system suites, same uninstall test.

…iner

Every matrix job pulled a ruby:*-bullseye image and then apt-installed
build tools, Chrome and Node (via NodeSource) from deb.debian.org. Those
downloads were the source of the recurring 'Connection reset by peer'
flakes that failed random single jobs across recent PRs.

Switch to the standard runner-native pattern:
- drop the container; run directly on ubuntu-latest
- ruby/setup-ruby@v1 for the matrix Ruby (prebuilt binaries)
- actions/setup-node@v6 for Node (drops the NodeSource apt step)
- apt-install only the pg/rgeo-geos headers (libpq-dev, libgeos-dev) from
  Ubuntu's mirrors; gcc/make/patch and Chrome are preinstalled
- point the test DB at 127.0.0.1: the postgis service is reachable by
  service name only from inside a job container; on the runner host it is
  published on localhost via the existing port mapping

No change to what is tested (same Redmine/Ruby/PostGIS matrix, same suites);
the host OS for the Ruby side becomes Ubuntu instead of Debian, which does
not affect plugin-level tests.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the PostGIS CI workflow to run the Ruby/Redmine/PostGIS test matrix directly on the GitHub-hosted Ubuntu runner (instead of inside a Debian-based Ruby container) to reduce network flakiness and simplify dependencies.

Changes:

  • Removes the container: ruby:*‑bullseye configuration and installs Ruby via ruby/setup-ruby@v1.
  • Sets up Node via actions/setup-node@v6 and limits apt installs to native gem headers (libpq-dev, libgeos-dev).
  • Switches the DB host from the service name to 127.0.0.1 to match runner-native service port publishing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-postgis.yml Outdated
Comment thread .github/workflows/test-postgis.yml
- Build/test steps referenced the plugin dir as a literal redmine_gtt while
  checkout uses ${{ env.PLUGIN_NAME }}; use the variable throughout so a
  rename or fork doesn't break the build dir or test paths.
- release.yml pinned Node 22 while test-postgis.yml uses 24; align release on
  24 so the frontend is built/tested/released on one Node major.
@dkastl
dkastl merged commit 9f65bb6 into next Jun 14, 2026
10 checks passed
@dkastl
dkastl deleted the ci/runner-native-tests branch June 14, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants