From 07492e3463f81437572d0391a62e1069e374b069 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 14:43:23 +0000 Subject: [PATCH 1/2] Initial plan From f1ba2352892dd24043a0d37d3ff9c3be3504771e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 14:49:30 +0000 Subject: [PATCH 2/2] Use MariaDB service in GitHub Actions instead of MySQL Co-authored-by: moio <250541+moio@users.noreply.github.com> Signed-off-by: Silvio Moioli --- .github/workflows/spec.yml | 14 +++++++++++++- config/database.yml.example | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index 8462143fc..dad4dbcd0 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -13,6 +13,19 @@ jobs: name: spec env: RAILS_ENV: test + DB_HOST: 127.0.0.1 + services: + db: + image: registry.opensuse.org/opensuse/mariadb:latest + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: >- + --health-cmd="mariadb-admin ping" + --health-interval=10s + --health-timeout=5s + --health-retries=3 steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 @@ -20,7 +33,6 @@ jobs: bundler-cache: true - name: Prepare spec run: | - sudo systemctl start mysql.service wget -nv http://sphinxsearch.com/files/dicts/en.pak bundle exec rake dev:bootstrap --trace bundle exec bin/rake webdrivers:chromedriver:update diff --git a/config/database.yml.example b/config/database.yml.example index 61d76f881..bec1a5507 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -1,6 +1,8 @@ <% if ENV['CONTAINER'] host = 'db' + elsif ENV['DB_HOST'] + host = ENV['DB_HOST'] end %>