From 22ee724c09ec633d36f9799ba0dead5c6fe24560 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Mon, 17 Aug 2026 07:07:56 +0200 Subject: [PATCH] Run the engine specs before mirroring and publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The engine's 180 specs were never run by CI: the mirror repo is generated by a subtree split, so a pipeline committed there would be overwritten on the next sync, and the monorepo's own pipeline only mirrored and published. A broken engine could reach the gem registry. The test now gates both — it runs on the same trigger the mirror does (a change under libs/ruby/warp_engine), and the steps after it only run if it passes. The specs need MySQL, hence the service, and a prepared test database: on a fresh database maintain_test_schema! reports the engine's own migrations as pending instead of loading the schema. Verified by running the step as written in a clean ruby:3.2 container against a fresh mysql:8 — 180 examples, 0 failures. Co-Authored-By: Claude Opus 5 (1M context) --- .woodpecker.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 730f7f6..d2cc36c 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -21,7 +21,37 @@ clone: partial: false depth: 0 # a subtree splithez teljes history kell +services: + - name: mysql + image: mysql:8 + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: "yes" + MYSQL_DATABASE: warp_engine_test + steps: + # A motor tesztje kapuzza a tobbit: ha bukik, se a tukrozes, se a gem + # kiadasa nem fut le. A mirror repoba nincs ertelme CI-t tenni, mert azt a + # subtree split minden alkalommal feluliria. + test-engine: + image: ruby:3.2 + environment: + RAILS_ENV: test + DB_HOST: mysql + commands: + - apt-get update && apt-get install -y --no-install-recommends default-libmysqlclient-dev + - cd libs/ruby/warp_engine + - bundle install --jobs 4 + - | + echo "==> Varakozas a mysql-re" + for i in $(seq 1 60); do + if mysqladmin ping -h mysql --silent 2>/dev/null; then break; fi + sleep 2 + done + - | + echo "==> Teszt adatbazis elokeszitese" + bundle exec rake app:db:test:prepare + - bundle exec rspec + split-mirror: image: alpine/git environment: