From 364604ea04b40e1f9c2880650991a2b3fedee41a Mon Sep 17 00:00:00 2001 From: Silvio Moioli Date: Tue, 27 Jan 2026 09:39:02 +0100 Subject: [PATCH 1/3] Use docker compose in CI to match local dev workflow CI was using Ubuntu's native MySQL packages while local development uses containerized MariaDB from openSUSE via docker-compose. This version mismatch caused collation recognition failures (eg. from PR #1840). Run CI through docker compose so both environments use the same database engine and container setup. Ref: https://github.com/SUSE/hackweek/pull/1840#issuecomment-3753704418 Co-Authored-By: Claude Opus 4.5 --- .github/workflows/next-rails.yml | 17 +++-------------- .github/workflows/spec.yml | 13 +++---------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/next-rails.yml b/.github/workflows/next-rails.yml index 572bbb61..5bc40fdc 100644 --- a/.github/workflows/next-rails.yml +++ b/.github/workflows/next-rails.yml @@ -10,22 +10,11 @@ jobs: if: contains(github.head_ref, 'next-rails') runs-on: ubuntu-latest name: next-spec - env: - RAILS_ENV: test steps: - - uses: actions/checkout@v2 - - name: Sets env vars for next-rails - run: | - echo "BUNDLE_GEMFILE=Gemfile.next" >> $GITHUB_ENV - echo "BUNDLE_CACHE_PATH=vendor/cache.next" >> $GITHUB_ENV - - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true + - uses: actions/checkout@v4 - 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 + docker compose run --rm -e BUNDLE_GEMFILE=Gemfile.next -e BUNDLE_CACHE_PATH=vendor/cache.next hackweek bundle exec rake dev:bootstrap --trace - name: Run tests - run: bundle exec rspec --color --format documentation + run: docker compose run --rm -e BUNDLE_GEMFILE=Gemfile.next -e BUNDLE_CACHE_PATH=vendor/cache.next hackweek bundle exec rspec --color --format documentation diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index 8462143f..e227f5fa 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -11,18 +11,11 @@ jobs: spec: runs-on: ubuntu-latest name: spec - env: - RAILS_ENV: test steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true + - uses: actions/checkout@v4 - 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 + docker compose run --rm hackweek bundle exec rake dev:bootstrap --trace - name: Run tests - run: bundle exec rspec --color --format documentation + run: docker compose run --rm hackweek bundle exec rspec --color --format documentation From a8a6b11955a60a51392571ff2d95f884afdd4f97 Mon Sep 17 00:00:00 2001 From: Silvio Moioli Date: Tue, 27 Jan 2026 09:49:43 +0100 Subject: [PATCH 2/3] Fix file ownership for docker compose in CI The GHA runner checks out files as uid 1001 (runner), but the hackweek container runs as uid 1000 (hackweek). chown the workspace to match the container user before running docker compose. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/next-rails.yml | 1 + .github/workflows/spec.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/next-rails.yml b/.github/workflows/next-rails.yml index 5bc40fdc..d6a7c17e 100644 --- a/.github/workflows/next-rails.yml +++ b/.github/workflows/next-rails.yml @@ -15,6 +15,7 @@ jobs: - name: Prepare spec run: | wget -nv http://sphinxsearch.com/files/dicts/en.pak + sudo chown -R 1000:1000 . docker compose run --rm -e BUNDLE_GEMFILE=Gemfile.next -e BUNDLE_CACHE_PATH=vendor/cache.next hackweek bundle exec rake dev:bootstrap --trace - name: Run tests run: docker compose run --rm -e BUNDLE_GEMFILE=Gemfile.next -e BUNDLE_CACHE_PATH=vendor/cache.next hackweek bundle exec rspec --color --format documentation diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index e227f5fa..c74d037a 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -16,6 +16,7 @@ jobs: - name: Prepare spec run: | wget -nv http://sphinxsearch.com/files/dicts/en.pak + sudo chown -R 1000:1000 . docker compose run --rm hackweek bundle exec rake dev:bootstrap --trace - name: Run tests run: docker compose run --rm hackweek bundle exec rspec --color --format documentation From 72e6c19c3b857936506542ee87b52813ee4e3e66 Mon Sep 17 00:00:00 2001 From: Silvio Moioli Date: Tue, 27 Jan 2026 10:19:42 +0100 Subject: [PATCH 3/3] Increase shared memory for Chrome headless in container Feature specs use Chrome headless via Selenium. Docker containers default to 64MB /dev/shm which causes Chrome tab crashes. Add shm_size to docker-compose.yml to fix this for both CI and local docker-compose test runs. Co-Authored-By: Claude Opus 4.5 --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7cca3746..21eb172e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - .:/hackweek:z ports: - "3000:3000" + shm_size: '256m' environment: - CONTAINER=1 depends_on: