Skip to content

Commit

Permalink
Update rspec Ruby, Gemfile, actions/cache, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Oct 14, 2023
1 parent e5f0d81 commit 1be0d9a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ updates:
interval: daily
open-pull-requests-limit: 10
allow:
- dependency-type: direct
- dependency-type: indirect
- dependency-type: all
versioning-strategy: lockfile-only
- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
29 changes: 2 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,12 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v1
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup

- name: Set up Ruby
if: runner.os == 'Linux'
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.6"
ruby-version: "3.1"
bundler-cache: true

- name: Install Homebrew/homebrew-test-bot RubyGems
if: runner.os == 'macOS'
run: bundle install --jobs 4 --retry 3

- name: Run Homebrew/homebrew-test-bot RSpec tests
run: bundle exec rspec

Expand Down Expand Up @@ -77,16 +56,12 @@ jobs:

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"

group :test do
gem "activesupport", "< 7" # 7 requires Ruby 2.7
gem "activesupport"
gem "rspec"
gem "simplecov"
end
20 changes: 15 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.7.6)
activesupport (7.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
base64 (0.1.1)
bigdecimal (3.1.4)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
diff-lcs (1.5.0)
docile (1.4.0)
drb (2.1.1)
ruby2_keywords
i18n (1.14.1)
concurrent-ruby (~> 1.0)
minitest (5.20.0)
mutex_m (0.1.2)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -26,6 +36,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
ruby2_keywords (0.0.5)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -34,15 +45,14 @@ GEM
simplecov_json_formatter (0.1.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.6.12)

PLATFORMS
ruby

DEPENDENCIES
activesupport (< 7)
activesupport
rspec
simplecov

BUNDLED WITH
1.17.3
2.4.10
8 changes: 4 additions & 4 deletions lib/junit.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# frozen_string_literal: true

require "rexml/document"
require "rexml/xmldecl"
require "rexml/cdata"

module Homebrew
# Creates Junit report with only required by BuildPulse attributes
# See https://github.com/Homebrew/homebrew-test-bot/pull/621#discussion_r658712640
Expand All @@ -15,6 +11,10 @@ def initialize(tests)
def build(filters: nil)
filters ||= []

require "rexml/document"
require "rexml/xmldecl"
require "rexml/cdata"

@xml_document = REXML::Document.new
@xml_document << REXML::XMLDecl.new
testsuites = @xml_document.add_element "testsuites"
Expand Down

0 comments on commit 1be0d9a

Please sign in to comment.