From 60425946d3f0345b22e6a60829526b6a54b4b5a6 Mon Sep 17 00:00:00 2001 From: Tristan Starck Date: Thu, 20 Feb 2025 11:36:36 -0800 Subject: [PATCH 1/3] STORY-20944: use ruby-test-matrix --- .github/workflows/pipeline.yml | 21 ++++----------------- .ruby-version | 1 + 2 files changed, 5 insertions(+), 17 deletions(-) create mode 100644 .ruby-version diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index bd7658f..14ff42c 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -3,20 +3,7 @@ name: Pipeline on: [push] jobs: tests: - name: Unit Tests - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby: [2.6, 2.7, '3.0', 3.1] - steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler: 2.3.9 - bundler-cache: true - - name: Unit tests - run: | - sudo apt-get install liblua5.1-0 - bundle exec rake + uses: Invoca/ruby-test-matrix-workflow/.github/workflows/ruby-test-matrix.yml@main + with: + pre-test-hook: "sudo apt-get install liblua5.1-0" + test-command: "bundle exec rake" diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..9cec716 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.6 From b4c8518dc261926992177935dc1cbcc6e6fbad82 Mon Sep 17 00:00:00 2001 From: Tristan Starck Date: Thu, 20 Feb 2025 11:38:12 -0800 Subject: [PATCH 2/3] STORY-20944: bump pry --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index dcdab09..3bab87c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,13 +8,13 @@ PATH GEM remote: https://rubygems.org/ specs: - coderay (1.1.2) + coderay (1.1.3) diff-lcs (1.3) ffi (1.17.0) - method_source (1.0.0) + method_source (1.1.0) mock_redis (0.28.0) ruby2_keywords - pry (0.13.1) + pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) rake (13.0.1) From ca6106986177a3540baaa08c2033d0a0935abfb9 Mon Sep 17 00:00:00 2001 From: Tristan Starck Date: Thu, 20 Feb 2025 11:40:12 -0800 Subject: [PATCH 3/3] STORY-20944: fix unit test --- spec/mock_redis_lua_extension_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/mock_redis_lua_extension_spec.rb b/spec/mock_redis_lua_extension_spec.rb index a6c1cee..a596dfc 100644 --- a/spec/mock_redis_lua_extension_spec.rb +++ b/spec/mock_redis_lua_extension_spec.rb @@ -288,7 +288,8 @@ end it 'puts parsed args when redis.debug() is called' do - expect_any_instance_of(MockRedis).to receive(:puts).with("hello, hi, 1.0, [5.0, 10.0], {\"monkey\"=>\"banana\", \"number\"=>200.0}, goodbye") + hash = { "monkey" => "banana", "number" => 200.0 } + expect_any_instance_of(MockRedis).to receive(:puts).with("hello, hi, 1.0, [5.0, 10.0], #{hash}, goodbye") lua_script = %q| local var1 = "hi" local var2 = 1.0