Skip to content

Commit

Permalink
chore(ci): Experiement with Knapsack Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbourdeau committed Mar 6, 2025
1 parent ad6be32 commit 447c076
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ci_node_total: [ 2 ]
ci_node_index: [ 0, 1 ]

env:
RAILS_ENV: test
DATABASE_URL: "postgres://lago:lago@localhost:5432/lago"
Expand Down Expand Up @@ -66,4 +72,9 @@ jobs:
- name: Dump Clickhouse database schema
run: bin/rails db:schema:dump:clickhouse
- name: Run tests
run: bundle exec rspec
env:
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_LOG_LEVEL: info
run: bundle exec rake knapsack_pro:queue:rspec
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ group :development, :test do
gem "rubocop-rspec", require: false
gem "rubocop-thread_safety", require: false
gem "awesome_print"
gem "knapsack_pro"
end

group :test do
Expand Down
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
require "money-rails/test_helpers"
require "active_storage_validations/matchers"

require 'knapsack_pro'

KnapsackPro::Adapters::RSpecAdapter.bind

DatabaseCleaner.allow_remote_database_url = true

SimpleCov.start do
Expand Down

0 comments on commit 447c076

Please sign in to comment.