diff --git a/.ruby-version b/.ruby-version index 49cdd66..15a2799 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.6 +3.3.0 diff --git a/Dockerfile b/Dockerfile index c6b345b..a9b3382 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.7.6-alpine +FROM ruby:3.3.0-alpine # Fetch/install gems RUN mkdir -p /opt/gems diff --git a/Gemfile.lock b/Gemfile.lock index 39fbebf..1ee406c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,59 +1,69 @@ GEM remote: https://rubygems.org/ specs: - ast (2.4.0) + ast (2.4.2) commonmarker (0.17.9) ruby-enum (~> 0.5) concurrent-ruby (1.0.5) - diff-lcs (1.5.0) - docile (1.4.0) + diff-lcs (1.5.1) + docile (1.4.1) haml (5.0.4) temple (>= 0.8.0) tilt i18n (1.0.1) concurrent-ruby (~> 1.0) - json (2.6.3) - parallel (1.12.1) - parser (2.5.1.0) - ast (~> 2.4.0) - powerpack (0.1.1) - rainbow (3.0.0) - rake (13.0.6) - rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.0) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + json (2.7.2) + language_server-protocol (3.17.0.3) + parallel (1.26.3) + parser (3.3.4.2) + ast (~> 2.4.1) + racc + racc (1.8.1) + rainbow (3.1.1) + rake (13.2.1) + regexp_parser (2.9.2) + rexml (3.3.6) + strscan + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.1) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-support (3.12.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.55.0) + rubocop (1.66.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 2.5) - powerpack (~> 0.1) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.32.2) + parser (>= 3.3.1.0) ruby-enum (0.7.2) i18n - ruby-progressbar (1.9.0) - simplecov (0.21.2) + ruby-progressbar (1.13.0) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.0) temple (0.8.0) tilt (2.0.8) - unicode-display_width (1.3.2) + unicode-display_width (2.5.0) PLATFORMS ruby diff --git a/README.md b/README.md index e993b45..6fece88 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Add a build step using the test-summary plugin: ```yaml - label: annotate plugins: - - instacart/test-summary#v1.17.0: + - instacart/test-summary#v1.18.0: inputs: - label: RSpec artifact_path: artifacts/rspec* diff --git a/bin/setup b/bin/setup index 98468d1..7b0b439 100755 --- a/bin/setup +++ b/bin/setup @@ -1,4 +1,6 @@ #!/usr/bin/env bash set -euo pipefail +BUNDLE_WITHOUT="development,test" +BUNDLE_FROZEN="true" bundle install --quiet diff --git a/lib/helpers.bash b/lib/helpers.bash index 0586021..674287e 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -11,6 +11,7 @@ function on_failure() { function run_plugin() { if [[ "${BUILDKITE_PLUGIN_TEST_SUMMARY_RUN_WITHOUT_DOCKER:-false}" = "true" ]]; then PLUGIN_BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" + [[ -n `which rbenv` ]] && rbenv shell $(cat $PLUGIN_BASEDIR/.ruby-version) BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" "$PLUGIN_BASEDIR/bin/setup" BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" bundler exec "$PLUGIN_BASEDIR/bin/run" else @@ -35,4 +36,4 @@ function run_plugin() { -e HTTP_PROXY -e HTTPS_PROXY \ "$IMAGE" fi -} \ No newline at end of file +} diff --git a/lib/test_summary_buildkite_plugin/input.rb b/lib/test_summary_buildkite_plugin/input.rb index 2cccfd9..ac6449e 100644 --- a/lib/test_summary_buildkite_plugin/input.rb +++ b/lib/test_summary_buildkite_plugin/input.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'tmpdir' require 'json' +require 'ostruct' # We don't use nokogiri because we use an alpine-based docker image # And adding the required dependencies triples the size of the image