Skip to content

Commit efff003

Browse files
committed
CI: Setup database services
We need this to test the various database adapters, as compoiste actions do not support starting services. Ignoring mysql/mariadb builds for Rails 8.0 because of rails/rails#53673, which has not been backported to Rails 8.0 yet.
1 parent 8e6280a commit efff003

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,29 @@ jobs:
1919
rspec:
2020
name: Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
2121
runs-on: ubuntu-24.04
22+
services:
23+
postgres:
24+
image: postgres:16
25+
env:
26+
POSTGRES_HOST_AUTH_METHOD: trust
27+
options: >-
28+
--health-cmd="pg_isready"
29+
--health-interval=10s
30+
--health-timeout=5s
31+
--health-retries=5
32+
ports:
33+
- 5432:5432
34+
mysql:
35+
image: mysql:8
36+
env:
37+
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
38+
options: >-
39+
--health-cmd="mysqladmin ping"
40+
--health-interval=10s
41+
--health-timeout=5s
42+
--health-retries=5
43+
ports:
44+
- 3306:3306
2245
strategy:
2346
fail-fast: false
2447
matrix:
@@ -43,13 +66,15 @@ jobs:
4366
ruby-version: "3.1"
4467
- solidus-branch: "v4.4"
4568
rails-version: "8.0"
69+
- database: "mysql" # https://github.com/rails/rails/issues/53673
70+
rails-version: "8.0"
4671
env:
4772
TEST_RESULTS_PATH: coverage/coverage.xml
4873
CAPYBARA_JAVASCRIPT_DRIVER: selenium_headless
4974
steps:
5075
- uses: actions/checkout@v4
5176
- name: Run extension tests
52-
uses: solidusio/test-solidus-extension@main
77+
uses: solidusio/test-solidus-extension@support-testings-dbs
5378
with:
5479
database: ${{ matrix.database }}
5580
rails-version: ${{ matrix.rails-version }}

0 commit comments

Comments
 (0)