Skip to content

Commit 27f3b63

Browse files
authored
Merge pull request #20 from umbrellio/clickhouse-support
2 parents 2b9e18c + ec3af35 commit 27f3b63

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jobs:
2424
run: bundle exec ci-helper CheckSpecSuffixes --extra-paths spec/*.rb --ignored-paths spec/*_helper.rb
2525
- name: Run specs
2626
run: bundle exec ci-helper RunSpecs
27-
- name: Audit
28-
run: bundle exec ci-helper BundlerAudit
2927
- name: Coveralls
3028
uses: coverallsapp/github-action@master
3129
with:
@@ -39,7 +37,7 @@ jobs:
3937
strategy:
4038
fail-fast: false
4139
matrix:
42-
ruby: ["2.7", "3.0", "3.1"]
40+
ruby: ["3.0", "3.1", "3.2", "3.3"]
4341

4442
steps:
4543
- uses: actions/checkout@v4

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
ci-helper (0.6.0)
4+
ci-helper (0.7.0)
55
colorize (~> 1.1)
66
dry-inflector (~> 1.0)
77
umbrellio-sequel-plugins (~> 0.14)

lib/ci_helper/commands.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def create_and_migrate_database!
5050
execute_with_env("bundle exec rake db:drop db:create db:migrate")
5151
end
5252

53+
def create_and_migrate_clickhouse_database!
54+
execute_with_env("bundle exec rake ch:create ch:migrate")
55+
end
56+
5357
def fail!(message)
5458
raise Error, message
5559
end

lib/ci_helper/commands/run_specs.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def call
77
return if job_files.empty?
88

99
create_and_migrate_database! if with_database?
10+
create_and_migrate_clickhouse_database! if with_clickhouse?
1011
execute("bundle exec rspec #{Shellwords.join(job_files)}")
1112
return 0 unless split_resultset?
1213

@@ -40,6 +41,10 @@ def with_database?
4041
boolean_option(:with_database)
4142
end
4243

44+
def with_clickhouse?
45+
boolean_option(:with_clickhouse)
46+
end
47+
4348
def split_resultset?
4449
boolean_option(:split_resultset)
4550
end

lib/ci_helper/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module CIHelper
4-
VERSION = "0.6.0"
4+
VERSION = "0.7.0"
55
end

spec/ci_helper/commands/run_specs_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
before { allow(Pathname).to receive(:pwd).and_return(mocked_pathname) }
1111

12-
let(:options) { Hash[split_resultset: "true", with_database: "true"] }
12+
let(:options) { Hash[split_resultset: "true", with_database: "true", with_clickhouse: "true"] }
1313

1414
let(:mocked_pathname) do
1515
instance_double(Pathname).tap do |pathname|
@@ -28,14 +28,15 @@
2828
let(:expected_commands) do
2929
[
3030
"export RAILS_ENV=test && bundle exec rake db:drop db:create db:migrate",
31+
"export RAILS_ENV=test && bundle exec rake ch:create ch:migrate",
3132
"bundle exec rspec cool_path_1 cool_path_0",
3233
"mv coverage/.resultset.json coverage/resultset.1.json",
3334
]
3435
end
3536

3637
it "executes command and exits with success" do
3738
expect(command).to eq(0)
38-
expect(popen_executed_commands.size).to eq(3)
39+
expect(popen_executed_commands.size).to eq(4)
3940
expect(popen_executed_commands).to eq(expected_commands)
4041
end
4142

0 commit comments

Comments
 (0)